The retaining of the tmpdir is used during debugging of test failures, but currently when a test fails, the next test is run overwritting the previous tmpdir value. This is a problem even when manually running individual test shell scripts if the failure is not the last test in the script.
Instead cause testing to about when retaintmpdir is true, which will cover the debugging needs for the majority of failure cases. Signed-off-by: John Johansen <john.johan...@canonical.com> --- tests/regression/apparmor/prologue.inc | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tests/regression/apparmor/prologue.inc b/tests/regression/apparmor/prologue.inc index 7b9d4c6..f476e0d 100755 --- a/tests/regression/apparmor/prologue.inc +++ b/tests/regression/apparmor/prologue.inc @@ -42,6 +42,12 @@ testfailed() # global num_testfailures teststatus num_testfailures=$(($num_testfailures + 1)) teststatus="fail" + + # if we are retaining the tmpdir we are debugging failures so + # stop so it can be looked at + if [ $retaintmpdir == "true" ] ; then + exit 127 + fi } error_handler() -- 1.7.9.1 -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor