diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-04-06 15:09:16 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-04-06 15:09:16 -0500 |
commit | 10c574cc26a4a55d63eed7f3b846efb4d766dd6b (patch) | |
tree | 9465713567b8af9f8f9762450bb43ae5a39a7fb8 /tests | |
parent | aa3ee9ce63f3fb92b548593d03dd427f59c33ce5 (diff) | |
download | ayatana-indicator-datetime-10c574cc26a4a55d63eed7f3b846efb4d766dd6b.tar.gz ayatana-indicator-datetime-10c574cc26a4a55d63eed7f3b846efb4d766dd6b.tar.bz2 ayatana-indicator-datetime-10c574cc26a4a55d63eed7f3b846efb4d766dd6b.zip |
in tests/run-eds-test.sh, only delete the tmpdir if the test passed.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run-eds-test.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/run-eds-test.sh b/tests/run-eds-test.sh index 1f020ef..0183350 100755 --- a/tests/run-eds-test.sh +++ b/tests/run-eds-test.sh @@ -11,8 +11,7 @@ echo ARG7=$7 # full executable path of gvfs echo ARG8=$8 # config files # set up the tmpdir and tell the shell to purge it when we exit -export TEST_TMP_DIR=$(mktemp -p "${TMPDIR:-.}" -d $3-XXXXXXXXXX) || exit 1 -trap 'rm -rf $TEST_TMP_DIR' EXIT +export TEST_TMP_DIR=$(mktemp -p "${TMPDIR:-/tmp}" -d $3-XXXXXXXXXX) || exit 1 echo "running test '$3' in ${TEST_TMP_DIR}" # set up the environment variables @@ -48,4 +47,11 @@ $1 --keep-env --max-wait=90 \ --task $4 --task-name "evolution" --wait-until-complete -r #--task $6 --task-name "source-registry" --wait-for=org.gtk.vfs.Daemon -r \ #--task $7 --task-name "gvfsd" -r -return $? +rv=$? + +# if the test passed, blow away the tmpdir +if [ $rv -eq 0 ]; then + rm -rf $TEST_TMP_DIR +fi + +return $rv |