diff --git a/extended-tests.py b/extended-tests.py index 4556e71..cbb0c36 100644 --- a/extended-tests.py +++ b/extended-tests.py @@ -1,6 +1,11 @@ import json import sys +import time import subprocess +import os + +import artiq + with open(sys.argv[1], "r") as hydra_json_file: hydra_json = json.load(hydra_json_file) @@ -11,6 +16,18 @@ drv = drv[len("/nix/store/"):] hydra_log = "/var/lib/hydra/build-logs/" + drv[:2] + "/" + drv[2:] with open(hydra_log, "w") as log: - def run(*args): - subprocess.run(args, stdout=log, stderr=log).check_returncode() + def run(*args, **kwargs): + subprocess.run(args, stdout=log, stderr=log, **kwargs).check_returncode() + run("artiq_flash", "-t", "kc705", "-V", "nist_clock") + + time.sleep(10) + + run("ping", "kc705-1", "-c10", "-w30") + + env = { + "ARTIQ_ROOT": artiq.__path__ + "/examples/kc705_nist_clock", + "ARTIQ_LOW_LATENCY": "1" + } + env.update(os.environ) + run("python", "-m", "unittest", "-v", "artiq.test.coredevice", env=env)