[CRIU] [PATCH] zdtm: print test dir,
dump and restore path (if any) in case of error
Stanislav Kinsbursky
skinsbursky at parallels.com
Mon Jan 30 03:53:50 EST 2012
Print dump and restore file in case of running all tests suit.
Signed-off-by: Stanislav Kinsbursky <skinsbursky at parallels.com>
---
test/zdtm.sh | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index f660dfd..2209eba 100644
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -67,27 +67,33 @@ run_test()
cd `dirname $0` || exit 1
+res=0
+
if [ $# -eq 0 ]; then
for t in $TEST_LIST; do
- run_test $t "" || exit 1
- done
+ run_test $t "" || res=$?
+ done &&
for t in $NS_TEST_LIST; do
- run_test $t "-n" || exit 1
+ run_test $t "-n" || res=$?
done
elif [ "$1" == "-l" ]; then
echo $TEST_LIST | sed -e "s#$ZP/##g" -e 's/ /\n/g'
echo $NS_TEST_LIST | sed -e "s#$ZP/##g" -e 's/ /\n/g'
else
if echo "$NS_TEST_LIST" | fgrep -q "$1" ; then
- run_test "$ZP/$1" "-n" && exit 0
+ run_test "$ZP/$1" "-n"
else
- run_test "$ZP/$1" && exit 0
+ run_test "$ZP/$1"
fi
- result=$?
+ res=$?
+fi
+if [ $res -ne 0 ]; then
echo "====================== ERROR ======================"
- if [ $result == 1 ]; then
- echo "Dump log: "$dump_path"/dump.log"
- else
+ echo "Test dir : "$dump_path
+ if [ -e "$dump_path/dump.log" ]; then
+ echo "Dump log : "$dump_path"/dump.log"
+ fi
+ if [ -e "$dump_path/restore.log" ]; then
echo "Restore log: "$dump_path"/restore.log"
fi
fi
More information about the CRIU
mailing list