From 62677ed660d220c00ae683d92b78e5867ac1f4df Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Wed, 5 Nov 2014 03:47:37 -0700 Subject: [PATCH] test.full_stack: add ARTIQ_NO_HARDWARE environment variable --- test/full_stack.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/full_stack.py b/test/full_stack.py index b5038ae87..7b87d7cfe 100644 --- a/test/full_stack.py +++ b/test/full_stack.py @@ -1,11 +1,15 @@ import unittest from operator import itemgetter +import os from artiq import * from artiq.coredevice import comm_serial, core, runtime_exceptions, rtio from artiq.sim import devices as sim_devices +NO_HARDWARE = bool(os.getenv("ARTIQ_NO_HARDWARE")) + + def _run_on_device(k_class, **parameters): with comm_serial.Comm() as comm: coredev = core.Core(comm) @@ -132,6 +136,7 @@ class _Exceptions(AutoContext): self.trace.append(104) +@unittest.skipIf(NO_HARDWARE, "no hardware") class ExecutionCase(unittest.TestCase): def test_primes(self): l_device, l_host = [], [] @@ -203,6 +208,7 @@ class _RTIOSequenceError(AutoContext): self.o.pulse(25*us) +@unittest.skipIf(NO_HARDWARE, "no hardware") class RTIOCase(unittest.TestCase): def test_loopback(self): npulses = 4