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:
parent
101e302fd5
commit
f815cb6adf
1 changed files with 3 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue