nixos/test: let python driver evaluate test code in global scope so the
user can define and use functions
This commit is contained in:
parent
855eb6f264
commit
4dba4db1db
|
@ -749,7 +749,7 @@ def run_tests() -> None:
|
||||||
if tests is not None:
|
if tests is not None:
|
||||||
with log.nested("running the VM test script"):
|
with log.nested("running the VM test script"):
|
||||||
try:
|
try:
|
||||||
exec(tests)
|
exec(tests, globals())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
eprint("error: {}".format(str(e)))
|
eprint("error: {}".format(str(e)))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue