summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorJacek Galowicz <jacek.galowicz@cyberus-technology.de>2019-11-20 18:57:52 +0100
committerJacek Galowicz <jacek.galowicz@cyberus-technology.de>2019-11-20 19:08:18 +0100
commit4dba4db1db3ac4aaffc6fb5faaa4703ae59c0e6c (patch)
tree56fcf00b7fb9ba595b6475bd48ef534a40f62109 /nixos/lib
parent855eb6f264ca1de1f2dbdc85df0382d1cd0170bf (diff)
nixos/test: let python driver evaluate test code in global scope so the
user can define and use functions
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/test-driver/test-driver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index 9d89960876eb2..dff31a8f8e1e3 100644
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -749,7 +749,7 @@ def run_tests() -> None:
     if tests is not None:
         with log.nested("running the VM test script"):
             try:
-                exec(tests)
+                exec(tests, globals())
             except Exception as e:
                 eprint("error: {}".format(str(e)))
                 sys.exit(1)