diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-25 19:01:44 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-08-11 00:09:27 +0100 |
commit | c142f82d221a3235b484c58fa57ea23f300fa5e6 (patch) | |
tree | 7a9fb293c28dddf05b7b28195f5eb050b05d96f5 /tests | |
parent | 95e855e90d3180fffb41ee4671aa496299945239 (diff) |
test suite: lib: Provide $tmp/must-clean directory to tests
This is a directory for things which should be removed on exit.
Currently there are none.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -22,7 +22,13 @@ END exit 16 } -trap 'test $? = 0 || t-report-failure' EXIT +trap ' + rc=$? + set +e + [ "x$DGIT_TEST_TMP" = x ] || rm -rf $DGIT_TEST_TMP/must-clean + set -e + test $rc = 0 || t-report-failure +' EXIT t-filter-out-git-hyphen-dir @@ -74,6 +80,11 @@ export DEBCHANGE_VENDOR=dpkg unset VISUAL unset GIT_EDITOR +mkdir -p $tmp/must-clean +# must-clean is usually removed after each test, on success or failure. +# But this must not be relied on for correctness, only for garbage +# collection etc. + mkdir -p $tmp/incoming cat <<END >$tmp/dput.cf [test-dummy] @@ -573,6 +584,8 @@ t-setup-import () { (set -e; cd $tmp; tar xf "$simport.tar") fi + mkdir -p $tmp/must-clean + . "$simport" } |