From 02a629dcc319e418b2f4185acb5bfb22bc86b3eb Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 11 Jul 2014 18:56:33 -0700 Subject: 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 Tested-by: Russ Allbery --- tests/client/full-t.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/client') 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 -# 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'); +} -- cgit v1.2.3