mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-16 14:39:23 +03:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue