chiark / gitweb /
jstest: run1: show whole console log output on failures
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Jul 2021 18:26:22 +0000 (19:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Jul 2021 18:26:22 +0000 (19:26 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
jstest/run1

index 7f7e91a218f333e0e2586023af0325b24a05d927..b8463b5b726fbe9a08b042d2c0b54b03d40cab20 100755 (executable)
@@ -31,6 +31,14 @@ sed >&3 <script.js '/^\/\/@@notest/,/^\/\/@@/d'
 cat >&3 $t.nodejs
 exec 3>&-
 
+set +e
 nodejs run.js >output
+rc=$?
+set -e
+
+if [ $rc != 0 ]; then
+       egrep '' /dev/null output ||:
+fi
 
 diff -u expect output
+exit $rc