From: NeilBrown Date: Mon, 22 Oct 2012 22:21:32 +0000 (+1100) Subject: test: keep separate log file for each failed test. X-Git-Tag: mdadm-3.3-rc1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dc837e4edc805819a1ff40add3d0beecfeecdbb;p=thirdparty%2Fmdadm.git 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 --- diff --git a/test b/test index e3133850..3f8515fe 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