diff options
author | Dan Nicholson <nicholson@endlessm.com> | 2019-06-13 15:57:17 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2019-06-19 17:30:24 +0000 |
commit | 0dd27bbf4b5a3f132a9b2418b391dacbcd64a003 (patch) | |
tree | 9c5c1ec723539b6a59e4da0a0f2a90dd3f53729b /tests/test-rofiles-fuse.sh | |
parent | b6979e7572395f3f99ba328ed9399ed4b862f9a7 (diff) | |
download | ostree-0dd27bbf4b5a3f132a9b2418b391dacbcd64a003.tar.gz |
tests/libtest: Allow appending actions to be run on EXIT
Currently if a test script adds a trap on `EXIT` to run some cleanup, it
will stomp on the existing trap to run `save_core()`. Allow for scripts
to append actions that will run on exit by introducing an array that
will be iterated over by a single exit runner.
Closes: #1799
Approved by: cgwalters
Diffstat (limited to 'tests/test-rofiles-fuse.sh')
-rwxr-xr-x | tests/test-rofiles-fuse.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh index 7b7474d0..1e09711c 100755 --- a/tests/test-rofiles-fuse.sh +++ b/tests/test-rofiles-fuse.sh @@ -41,7 +41,7 @@ rofiles-fuse checkout-test2 mnt cleanup_fuse() { fusermount -u ${test_tmpdir}/mnt || true } -trap cleanup_fuse EXIT +libtest_exit_cmds+=(cleanup_fuse) assert_file_has_content mnt/firstfile first echo "ok mount" |