nixos/test-driver: print a traceback when testScript fails (#92369)

* print a traceback: assertion message can be empty

* change print back to eprint
This commit is contained in:
Justinas Stankevičius 2020-07-07 00:29:40 +03:00 committed by GitHub
parent 101e302fd5
commit f815cb6adf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ import subprocess
import sys
import tempfile
import time
import traceback
import unicodedata
CHAR_TO_KEY = {
@ -892,7 +893,8 @@ def run_tests() -> None:
try:
exec(tests, globals())
except Exception as e:
eprint("error: {}".format(str(e)))
eprint("error: ")
traceback.print_exc()
sys.exit(1)
else:
ptpython.repl.embed(locals(), globals())