summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorfenugrec <fenugrec@users.sourceforge.net>2018-04-27 10:22:22 -0400
committerUwe Hermann <uwe@hermann-uwe.de>2018-05-12 17:16:00 +0200
commit4aebc67a910c7f190287defb5c276a522db889ae (patch)
tree3c1030c5938a1f3749be7a6ce07cc37073ea32b6 /README
parentc83a4758759625c438791d3aa5bc4c4823649157 (diff)
downloadsigrok-test-4aebc67a910c7f190287defb5c276a522db889ae.tar.gz
sigrok-test-4aebc67a910c7f190287defb5c276a522db889ae.zip
README: add section on adding tests
Diffstat (limited to 'README')
-rw-r--r--README33
1 files changed, 33 insertions, 0 deletions
diff --git a/README b/README
index 6d20e17..85784b2 100644
--- a/README
+++ b/README
@@ -54,6 +54,39 @@ 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 <pdname> channel <pd_channel_name>=<#> ...
+
+ 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 troubleshoot a specific test, try:
+
+ * Run all tests under decoder/test/<testroot>:
+
+ ./decoder/pdtest -v -d -r <testroot>
+
+ * Run the named test. Note, in this case <testname> is not
+ a file but rather a test described in <testroot>/test.conf.
+
+ ./decoder/pdtest -v -d -r <testroot>/<testname>
+
+ * Print parameters as parsed from <testroot>/test.conf (to spot typos):
+
+ ./decoder/pdtest -v -s <testroot>
+
+
Copyright and license
---------------------