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
@ -22,6 +22,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
import unicodedata
|
import unicodedata
|
||||||
|
|
||||||
CHAR_TO_KEY = {
|
CHAR_TO_KEY = {
|
||||||
@ -892,7 +893,8 @@ def run_tests() -> None:
|
|||||||
try:
|
try:
|
||||||
exec(tests, globals())
|
exec(tests, globals())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
eprint("error: {}".format(str(e)))
|
eprint("error: ")
|
||||||
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
ptpython.repl.embed(locals(), globals())
|
ptpython.repl.embed(locals(), globals())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user