Browse Source

better error output

Rodja Trappe 3 years ago
parent
commit
4de711e8eb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      test_startup.sh

+ 2 - 1
test_startup.sh

@@ -1,13 +1,14 @@
 #!/usr/bin/env bash
 #!/usr/bin/env bash
 
 
 run() {
 run() {
-    output=`{ timeout 2 python3 $1; } 2>&1`
+    output=`{ timeout 5 python3 $1; } 2>&1`
     exitcode=$?
     exitcode=$?
     test $exitcode -eq 124 && exitcode=0 # exitcode 124 is comming from "timeout command above"
     test $exitcode -eq 124 && exitcode=0 # exitcode 124 is comming from "timeout command above"
     echo $output | grep "JustPy ready to go" > /dev/null || exitcode=1
     echo $output | grep "JustPy ready to go" > /dev/null || exitcode=1
     echo $output | grep "Traceback" > /dev/null && exitcode=1
     echo $output | grep "Traceback" > /dev/null && exitcode=1
     echo $output | grep "Error" > /dev/null && exitcode=1
     echo $output | grep "Error" > /dev/null && exitcode=1
     if test $exitcode -ne 0; then
     if test $exitcode -ne 0; then
+        echo "wrong exit code $exitcode. Output was:"
         echo $output
         echo $output
         return 1
         return 1
     fi
     fi