X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-test.git;a=blobdiff_plain;f=README;h=962658ae5a71fd3dffe51e08d8bfbe3648b34784;hp=042f8e1bc0dfba49dac28951c10c0229844a1a0c;hb=1d7399acc38ab2f058722e6b5e76592790448738;hpb=fb2f61ba51430780fe8454149f790b140ac0e28e diff --git a/README b/README index 042f8e1..962658a 100644 --- a/README +++ b/README @@ -28,8 +28,8 @@ Requirements - pkg-config >= 0.22 - libglib >= 2.24.0 - Python >= 3.2 - - libsigrok >= 0.3.0 - - libsigrokdecode >= 0.4.0 + - libsigrok >= 0.5.0 + - libsigrokdecode >= 0.5.0 - python3-coverage @@ -54,6 +54,49 @@ This will test the decoders located at /path/to/decoders: $ LD_LIBRARY_PATH=$HOME/sr/lib ./decoder/pdtest -r -v -a +Adding tests +------------ + +The best way to add tests is to copy one that is similar, and adjust +accordingly. Some notes: + + * In test.conf, the channel assignments must be done in a specific way: + + protocol-decoder channel =<#> ... + + Example: + + protocol-decoder mcs48 d0=8 d1=9 [...] a8=0 ... + + Of important note, the channels/probes are numbered from 0, regardless of + the naming used in the capture file. + + * To initially generate the test files which have been configured in test.conf + pdtest has to be run with the -f parameter first. + + Example: + + ./decoder/pdtest -r -v -f + + This can also be done to update the test-cases in case of a changes in + the protocol decoder. + + * To troubleshoot a specific test, try: + + * Run all tests under decoder/test/: + + ./decoder/pdtest -v -d -r + + * Run the named test. Note, in this case is not + a file but rather a test described in /test.conf. + + ./decoder/pdtest -v -d -r / + + * Print parameters as parsed from /test.conf (to spot typos): + + ./decoder/pdtest -v -s + + Copyright and license ---------------------