Skip to content

Commit

Permalink
ST: Fix conditions and rename folder/script
Browse files Browse the repository at this point in the history
  • Loading branch information
boddenberg-it committed Sep 16, 2018
1 parent 6fc28df commit b29cc3b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 8 deletions.
6 changes: 2 additions & 4 deletions serial_e2e_tests/README.md → busvoodoo_e2e_tests/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# serial e2e test
# BusVoodoo e2e tests

under heavy development...

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



Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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'
Expand All @@ -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']
Expand All @@ -83,13 +101,31 @@ 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:

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:

0 comments on commit b29cc3b

Please sign in to comment.