Browse Source

Fix stall-out when tests fail

Steven Silvester 8 years ago
parent
commit
7afcfce999
1 changed files with 4 additions and 1 deletions
  1. 4 1
      test/run-test.py

+ 4 - 1
test/run-test.py

@@ -63,8 +63,11 @@ def run_karma(base_url, token, terminalsAvailable):
     cmd = ['karma', 'start'] + ARGS
     print('\n\nRunning karma as: %s\n\n' % ' '.join(cmd))
 
+    # Note: `subprocess.check_call` stalls if the test fails.
     shell = os.name == 'nt'
-    return subprocess.check_call(cmd, shell=shell)
+    p = subprocess.Popen(cmd, shell=shell)
+    p.communicate()
+    return p.returncode
 
 
 class TestApp(NotebookApp):