]> sigrok.org Git - sigrok-test.git/blobdiff - README
usb_power_delivery: Update tests to match new output of decoder
[sigrok-test.git] / README
diff --git a/README b/README
index 2f9d9aa1dbcc7eaece850d6f50240559d63ea678..85784b285ee82f815c203a300f167102144f6255 100644 (file)
--- a/README
+++ b/README
@@ -28,8 +28,8 @@ Requirements
  - pkg-config >= 0.22
  - libglib >= 2.24.0
  - Python >= 3.2
  - pkg-config >= 0.22
  - libglib >= 2.24.0
  - Python >= 3.2
- - libsigrok >= 0.3.0
- - libsigrokdecode >= 0.3.0
+ - libsigrok >= 0.5.0
+ - libsigrokdecode >= 0.5.0
  - python3-coverage
 
 
  - python3-coverage
 
 
@@ -44,13 +44,47 @@ In order to get the sigrok-test source code and build it, run:
 
  $ git clone git://sigrok.org/sigrok-test
  $ cd sigrok-test
 
  $ git clone git://sigrok.org/sigrok-test
  $ cd sigrok-test
+ $ ./autogen.sh
  $ PKG_CONFIG_PATH=$HOME/sr/lib/pkgconfig ./configure \
        --with-decodersdir=/path/to/decoders
  $ make
 
 This will test the decoders located at /path/to/decoders:
 
  $ PKG_CONFIG_PATH=$HOME/sr/lib/pkgconfig ./configure \
        --with-decodersdir=/path/to/decoders
  $ make
 
 This will test the decoders located at /path/to/decoders:
 
- $ LD_LIBRARY_PATH=$HOME/sr/lib ./decoder/test/pdtest -r -v -a
+ $ 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
 
 
 Copyright and license