Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions openstack/tools/charmed_openstack_functest_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ export TEST_JUJU3=1
# NOTE: this should not be necessary for > juju 2.x but since we still have a need for it we add it in
export TEST_ZAZA_BUG_LP1987332=1

# Juju 3.x is a confined snap so cannot read/write from/to /tmp. This makes the tests use a path that juju can read/write.
export TMPDIR=$(mktemp -d ${HOME}/charm-functests-tmp-XXXX)

# Some charms point to an upstream constraints file that installs python-libjuju 2.x so we need to do this to ensure we get 3.x
# NOTE: we only do this if we are using Juju >= 3.x
juju_version=$(juju --version)
Expand Down Expand Up @@ -433,3 +436,8 @@ if [[ -z $RERUN_PHASE ]] || [[ $RERUN_PHASE = 'test' ]]; then
fi
) 2>&1 | tee $LOGFILE
echo -e "\nResults also saved to $LOGFILE"

if [ -d $TMPDIR ]; then
rm -rf $TMPDIR
unset TMPDIR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is if we dont want to have a new directory every time we run the script

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring the unset TMPDIR line. At script exit, this doesn't make any difference.

fi
Loading