Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bf188d05bf3d
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 703fc5a61f21
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 9, 2016

  1. tests: test spi business

    jordens committed Mar 9, 2016
    Copy the full SHA
    58e0e67 View commit details
  2. Copy the full SHA
    703fc5a View commit details
Showing with 27 additions and 0 deletions.
  1. +24 −0 artiq/test/coredevice/test_spi.py
  2. +3 −0 artiq/test/hardware_testbench.py
24 changes: 24 additions & 0 deletions artiq/test/coredevice/test_spi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from artiq.experiment import *
from artiq.test.hardware_testbench import ExperimentCase


class Busy(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("spi0")
self.setattr_device("led")

@kernel
def run(self):
self.spi0.set_config_mu()
delay(-8*ns)
self.spi0.set_config_mu() # causes the error
self.led.on()
self.led.sync() # registers the error
self.core.break_realtime()
self.spi0.set_config_mu() # raises the error


class SPITest(ExperimentCase):
def test_busy(self):
self.execute(Busy)
3 changes: 3 additions & 0 deletions artiq/test/hardware_testbench.py
Original file line number Diff line number Diff line change
@@ -124,3 +124,6 @@ def execute(self, cls, **kwargs):
except CompileError as error:
# Reduce amount of text on terminal.
raise error from None
except Exception as exn:
exn.args = exn.args[0] + "\n" + str(exn.artiq_core_exception),
raise exn