From 1dc837e4edc805819a1ff40add3d0beecfeecdbb Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 23 Oct 2012 09:21:32 +1100 Subject: [PATCH] test: keep separate log file for each failed test. If a test failed when --keep-going is selected, give the log file a name based on the test name, so that all the logs can be examined afterwards. Signed-off-by: NeilBrown --- test | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test b/test index e313385..3f8515f 100755 --- a/test +++ b/test @@ -232,7 +232,12 @@ do_test() { echo "succeeded" _fail=0 else - echo "FAILED - see $targetdir/log for details" + log=log + if [ $exitonerror == 0 ]; then + log=log-`basename $_script` + mv $targetdir/log $targetdir/$log + fi + echo "FAILED - see $targetdir/$log for details" _fail=1 fi if [ "$savelogs" == "1" ]; then