aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-07-11 18:56:33 -0700
committerRuss Allbery <rra@stanford.edu>2014-07-11 19:03:34 -0700
commit02a629dcc319e418b2f4185acb5bfb22bc86b3eb (patch)
treee4cb07e929c06f6ea1bdc654713f1c13b108b5eb /tests
parentcc9bb004ad8bc00b5685021848eeb1c0b6bd1f51 (diff)
Fix test cleanup code to run during global destruction
If we don't run the code to delete the wallet database very late, destruction of the SQLite objects may recreate the database file. Move the unlink to an END block to avoid this problem. Change-Id: Ib5ec2cbd08ba24c99f3dfa1daa01488931c5958f Reviewed-on: https://gerrit.stanford.edu/1525 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/client/full-t.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/client/full-t.in b/tests/client/full-t.in
index 4db0dbd..b73a375 100644
--- a/tests/client/full-t.in
+++ b/tests/client/full-t.in
@@ -3,7 +3,7 @@
# End-to-end tests for the wallet client.
#
# Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2008, 2010
+# Copyright 2008, 2010, 2014
# The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.
@@ -188,8 +188,12 @@ SKIP: {
# All done.
remctld_stop;
$admin->destroy;
- unlink ('wallet-db', 'krb5cc_test', 'test-pid');
if (-d 'test-files') {
system ('rm', '-r', 'test-files');
}
}
+
+# Clean up the database and other test files at the end of the test.
+END {
+ unlink ('wallet-db', 'krb5cc_test', 'test-pid');
+}