aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-04-06 15:09:16 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-04-06 15:09:16 -0500
commit10c574cc26a4a55d63eed7f3b846efb4d766dd6b (patch)
tree9465713567b8af9f8f9762450bb43ae5a39a7fb8 /tests
parentaa3ee9ce63f3fb92b548593d03dd427f59c33ce5 (diff)
downloadayatana-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-xtests/run-eds-test.sh12
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