]> code.ossystems Code Review - openembedded-core.git/commitdiff
tcl: in run-ptest show output if a test fails
authorRoss Burton <ross.burton@intel.com>
Fri, 14 Dec 2018 17:10:42 +0000 (17:10 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 15 Dec 2018 11:47:59 +0000 (11:47 +0000)
If a test fails the log has useful information, so include that in the output.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/tcltk/tcl/run-ptest

index dadba655f2aa34c07cd5f60ab88d54607ff1e430..22bb69ae0db0a1a8bd43841590cac1ff3cf3da56 100644 (file)
@@ -1,8 +1,13 @@
 #!/bin/sh
 
-for i in `ls tests/*.test |awk -F/ '{print $2}'`; \
-    do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i >$i.tmp 2>&1; \
-    grep -q "^Files with failing tests:" $i.tmp; \
-    if [ $? -eq 0 ]; then echo "FAIL: $i"; \
-    else echo "PASS: $i"; rm -f $i.tmp; fi; \
+for i in `ls tests/*.test | awk -F/ '{print $2}'`; do
+    TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i >$i.log 2>&1
+    grep -q "^Files with failing tests:" $i.log
+    if [ $? -eq 0 ]; then
+        echo "FAIL: $i"
+        cat $i.log
+    else
+        echo "PASS: $i"
+    fi
+    rm -f $i.log
 done