From: Masami Hiramatsu Date: Sat, 9 May 2020 00:58:25 +0000 (+0900) Subject: tools/bootconfig: Add a summary of test cases and return error X-Git-Tag: v5.8-rc1~80^2~12 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=98d0a685cf8bcde23f4b0d1aa0a348fcef84569b;p=linux-block.git tools/bootconfig: Add a summary of test cases and return error Add summary lines of test cases and return an error code if any test case fails so that tester don't have to monitor the output. Link: https://lkml.kernel.org/r/158898590533.22749.10269622752797822320.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) --- diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh index 81b350ffd03f..eff16b77d5eb 100755 --- a/tools/bootconfig/test-bootconfig.sh +++ b/tools/bootconfig/test-bootconfig.sh @@ -124,9 +124,16 @@ for i in samples/good-* ; do xpass $BOOTCONF -a $i $INITRD done + +echo +echo "=== Summary ===" +echo "# of Passed: $(expr $NO - $NG - 1)" +echo "# of Failed: $NG" + echo if [ $NG -eq 0 ]; then echo "All tests passed" else echo "$NG tests failed" + exit 1 fi