소스 검색

better error output

Rodja Trappe 3 년 전
부모
커밋
4de711e8eb
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      test_startup.sh

+ 2 - 1
test_startup.sh

@@ -1,13 +1,14 @@
 #!/usr/bin/env bash
 
 run() {
-    output=`{ timeout 2 python3 $1; } 2>&1`
+    output=`{ timeout 5 python3 $1; } 2>&1`
     exitcode=$?
     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 "Traceback" > /dev/null && exitcode=1
     echo $output | grep "Error" > /dev/null && exitcode=1
     if test $exitcode -ne 0; then
+        echo "wrong exit code $exitcode. Output was:"
         echo $output
         return 1
     fi