From b29cc3b04c7fb09fecc16ffbbf858d88e930d773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Boddenberg?= Date: Sun, 16 Sep 2018 12:45:35 +0200 Subject: [PATCH] ST: Fix conditions and rename folder/script --- .../README.md | 6 +-- .../busvoodoo_e2e_tests.py | 6 +-- .../busvoodoo_e2e_tests.yml | 38 ++++++++++++++++++- 3 files changed, 42 insertions(+), 8 deletions(-) rename {serial_e2e_tests => busvoodoo_e2e_tests}/README.md (67%) rename serial_e2e_tests/BusVoodoo_e2e_tests.py => busvoodoo_e2e_tests/busvoodoo_e2e_tests.py (98%) rename {serial_e2e_tests => busvoodoo_e2e_tests}/busvoodoo_e2e_tests.yml (68%) diff --git a/serial_e2e_tests/README.md b/busvoodoo_e2e_tests/README.md similarity index 67% rename from serial_e2e_tests/README.md rename to busvoodoo_e2e_tests/README.md index a2eb857..fc8d329 100644 --- a/serial_e2e_tests/README.md +++ b/busvoodoo_e2e_tests/README.md @@ -1,4 +1,4 @@ -# serial e2e test +# BusVoodoo e2e tests under heavy development... @@ -6,13 +6,11 @@ following testsuites shall run: - testing all non-protocol specific commands (help, version, etc pp) (9 tests) -- switching to all protocols with default settings and quit to HiZ aqain (4 tests) +- switching to all protocols with default settings, quit to HiZ aqain (4 tests) - testing all protocol specific commands (one suite per protocol) (?) - testing all protocol cominations (one suite per protocol) (4k+) -2 * len(prots) + 2 => 10 suites - diff --git a/serial_e2e_tests/BusVoodoo_e2e_tests.py b/busvoodoo_e2e_tests/busvoodoo_e2e_tests.py similarity index 98% rename from serial_e2e_tests/BusVoodoo_e2e_tests.py rename to busvoodoo_e2e_tests/busvoodoo_e2e_tests.py index 470c083..27ec102 100755 --- a/serial_e2e_tests/BusVoodoo_e2e_tests.py +++ b/busvoodoo_e2e_tests/busvoodoo_e2e_tests.py @@ -97,10 +97,10 @@ def generic_inputs(inputs, expectations): def get_protocols_based_on_hw_verison(protocols): # only one protocol specified - if protocols is not 'all' and ',' not in protocols: + if protocols != 'all' and ',' not in protocols: return [protocols] # used for default choices - if protocols is 'all': + if protocols == 'all': protocols = yaml["protocols"] # comma-separated list of protocols elif ',' in protocols: @@ -202,7 +202,7 @@ def pinstest(): error("passed HW_VERSION does NOT match device HW_VERSION!") sys.exit(1) -if args.testboard: +if args .testboard: log('...init serial connection to testboard...') tb_serial = serial.Serial('/dev/ttyACM1', timeout=1) diff --git a/serial_e2e_tests/busvoodoo_e2e_tests.yml b/busvoodoo_e2e_tests/busvoodoo_e2e_tests.yml similarity index 68% rename from serial_e2e_tests/busvoodoo_e2e_tests.yml rename to busvoodoo_e2e_tests/busvoodoo_e2e_tests.yml index 2d04854..1dc407f 100644 --- a/serial_e2e_tests/busvoodoo_e2e_tests.yml +++ b/busvoodoo_e2e_tests/busvoodoo_e2e_tests.yml @@ -30,6 +30,15 @@ protocols: uart: hardware_version: '0,A' commands: + # "[/] select/deselect slave" is not tested + 10100: [ 'write: 0x74' ] + '0x3a': [ 'write: 0x3a' ] + '0b1': [ 'write: 0x01' ] + "'a'": [ 'write: 0x61' ] + r: [ 'read: 0x00' ] + u: [ 'wait for 1 us' ] + m: [ 'wait for 1 ms' ] + m:42: [ 'wait for 42 ms' ] combinations: inputs: - [1, 2] @@ -48,6 +57,16 @@ protocols: i2c: hardware_version: '0,A' + commands: + # "[/] select/deselect slave" is not tested + 10100: [ 'write: 0x74' ] + '0x3a': [ 'write: 0x3a' ] + '0b1': [ 'write: 0x01' ] + "'a'": [ 'write: 0x61' ] + r: [ 'read: 0x00' ] + u: [ 'wait for 1 us' ] + m: [ 'wait for 1 ms' ] + m:42: [ 'wait for 42 ms' ] spi: hardware_version: '0,A' @@ -61,7 +80,6 @@ protocols: u: [ 'wait for 1 us' ] m: [ 'wait for 1 ms' ] m:42: [ 'wait for 42 ms' ] - x: [ 'andre' ] combinations: inputs: - ['m spi'] @@ -83,6 +101,15 @@ protocols: 1-wire: hardware_version: '0,A' commands: + # "[/] select/deselect slave" is not tested + 10100: [ 'write: 0x74' ] + '0x3a': [ 'write: 0x3a' ] + '0b1': [ 'write: 0x01' ] + "'a'": [ 'write: 0x61' ] + r: [ 'read: 0x00' ] + u: [ 'wait for 1 us' ] + m: [ 'wait for 1 ms' ] + m:42: [ 'wait for 42 ms' ] combinations: inputs: expectations: @@ -90,6 +117,15 @@ protocols: can: hardware_version: 'A' commands: + # "[/] select/deselect slave" is not tested + 10100: [ 'write: 0x74' ] + '0x3a': [ 'write: 0x3a' ] + '0b1': [ 'write: 0x01' ] + "'a'": [ 'write: 0x61' ] + r: [ 'read: 0x00' ] + u: [ 'wait for 1 us' ] + m: [ 'wait for 1 ms' ] + m:42: [ 'wait for 42 ms' ] combinations: inputs: expectations: