From 22e5e9fbde51728a2c3afee711209a6d53c27471 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 19 Feb 2019 00:50:05 +0800 Subject: [PATCH] run HITL tests on KC705 --- extended-tests.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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)