add libs
This commit is contained in:
26
lib_gpio/tests/test_input_1bit_events.py
Normal file
26
lib_gpio/tests/test_input_1bit_events.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_events_checker import GPIOEventsChecker
|
||||
|
||||
def do_input_1bit_events_test():
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
binary = 'gpio_input_1bit_test/bin/input_events/gpio_input_1bit_test_input_events.xe'
|
||||
|
||||
checker = GPIOEventsChecker(test_port="tile[0]:XS1_PORT_1A",
|
||||
expected_test_port_data=0b1,
|
||||
num_clients=1,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_1bit_events_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_1bit_events_test',
|
||||
regexp=False)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_1bit_events_test()
|
||||
Reference in New Issue
Block a user