diff options
author | Amitay Isaacs <amitay@gmail.com> | 2015-07-06 15:14:53 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2015-07-09 06:23:21 +0200 |
commit | aa9ca809bebb17136e05817bc4c89c208424f52f (patch) | |
tree | be6cd606f3a90ebbbc385d290d1eaa7bc3205e5c /ctdb/tests/onnode | |
parent | 2290e7a01e606f3fe695301ffee846de9a28dd7f (diff) | |
download | samba-aa9ca809bebb17136e05817bc4c89c208424f52f.tar.gz |
ctdb-tests: Add test cleanup hooks
To do any cleanup before exiting the test, register hooks with
test_cleanup(). Multiple hooks can be registered. All the hooks will
be called before exiting from the test.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/tests/onnode')
-rw-r--r-- | ctdb/tests/onnode/scripts/local.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/tests/onnode/scripts/local.sh b/ctdb/tests/onnode/scripts/local.sh index daefaa47201..b9f4f0ada4e 100644 --- a/ctdb/tests/onnode/scripts/local.sh +++ b/ctdb/tests/onnode/scripts/local.sh @@ -46,7 +46,7 @@ ctdb_set_output () _rc="$ONNODE_TESTS_VAR_DIR/ctdb.rc" echo "${1:-0}" >"$_rc" - trap "rm -f $_out $_rc" 0 + test_cleanup "rm -f $_out $_rc" } extra_footer () |