Gerhard Sittig [Sat, 29 Jul 2023 15:43:53 +0000 (17:43 +0200)]
rgb_led_ws281x: catch up with colour component annotations
The decoder was extended to also emit annotations for individual colour
components (R/G/B and W). Adjust the data files with expected output
data. See diff -U0 for review of what was added. No other annotations
are affected.
Gerhard Sittig [Sat, 29 Jul 2023 15:39:15 +0000 (17:39 +0200)]
rgb_led_ws281x: catch up with decoder option rename
The 'type' option was replaced by 'wireorder' and 'textorder'. Adjust
the test.conf data. The configuration of the test, its input data, and
expected output remain identical. No change in behaviour.
Gerhard Sittig [Mon, 3 Oct 2022 19:14:26 +0000 (21:14 +0200)]
parallel: recent PD implementation flushes last samples upon EOF
Catch up with the implementation of the "parallel" decoder, which now
flushes previously accumulated information when the end of input data
is seen. Which completes the last "item" (data pattern on the bus), and
may complete another "word" (data value that spans several bus cycles).
Gerhard Sittig [Sat, 23 Apr 2022 06:32:30 +0000 (08:32 +0200)]
pdtest: add support for input format specs in test.conf files
The pdtest(1) utility interprets test.conf files. Extend the syntax of
'input' lines. These used to accept one filename only. Add support for
'format' and 'option' keywords. These translate to runtc(1) -I options.
Gerhard Sittig [Sat, 23 Apr 2022 06:39:20 +0000 (08:39 +0200)]
runtc: add support for input file formats other than native srzip
Introduce the -I command line option for the tstrun(1) utility, accept
input file format names, and options for the input module. Take single
words in multiple -I specs to simplify the internal interface between
the pdtest(1) and the tstrun(1) tools. This follows the existing pattern
for decoder options and channel assignments. The first spec is the file
format name (use 'match' for automatic detection). Subsequent specs are
input module options.
This makes all libsigrok supported input file formats available to the
sigrok-test environment, which formerly was constrained to .sr archives
only. Although the runtc(1) utility resides in the "decoder/" hierarchy,
it can both use VCD and other files to stimulate decoder tests, as well
as cover file formats and their specific features in future tests by
checking that the imported file's content is seen or that their options
take effect.
Gerhard Sittig [Sat, 23 Apr 2022 13:29:09 +0000 (15:29 +0200)]
runtc: cope with "late" samplerate announcement
The previous implementation expected a rather specific sequence of
SR_DF_HEADER with samplerate, then SR_DF_LOGIC. This worked with .sr
formatted session files. But does not work with other input formats.
Also process SR_DF_META packets. Pass any samplerate that we learn about
to decoders' .metadata() method. Defer decoders' .start() until the first
logic samples are seen. This improves robustness of the decoder tests.
Gerhard Sittig [Sat, 23 Apr 2022 06:36:14 +0000 (08:36 +0200)]
runtc: avoid the 'class' identifier in C language application code
The 'class' identifier is a reserved word in the C++ language, while
development tools may combine C and C++ support and get confused. Avoid
conflicts, rename the variable to 'class_' in runtc.c source code.
Gerhard Sittig [Mon, 21 Feb 2022 22:13:38 +0000 (23:13 +0100)]
configure.ac: check for python3-embed
Check for the python3-embed availability to eliminate the necessity to
list all currently existing minor versions and keep catching up as more
are released. Break the long text line with the many Python packages.
Gerhard Sittig [Sun, 26 Dec 2021 06:48:39 +0000 (07:48 +0100)]
configure: check libsigrokdecode version dependent features
Check for the srd_session_send_eof() routine's presence which depends
on the library version. This introduces a config.h header file in the
sigrok-test build setup.
Gerhard Sittig [Sat, 25 Dec 2021 19:02:00 +0000 (20:02 +0100)]
ir_irmp: introduce IRMP test cases, cover NEC/RC5/RC6/SIRC and others
The upstream IRMP project's decoder core is only slowly moving, we can
consider the IRMP decoder integration to be stable and don't expect the
output to change violently any longer. The issue of requiring a single
core instance remains and affects the GUI, but not the single threaded
test suite.
This set of test cases re-uses the NEC, RC5, RC6, and SIRC dumps which
are covered by individual decoders, too. Ideally detection results would
be identical, but in practise the annotation positions and the level of
details will differ between implementations due to their internal
operation and design choices.
The IRMP test set also covers dumps which are not covered by other IR
decoders. It's interesting to see how not all key repetitions are caught
and how single press might be missed as well. It's valuable to remain
aware during maintenance, and see how occassional failure changes. This
is why an empty output for a non-empty dump is kept here, too.
Gerhard Sittig [Tue, 10 Nov 2020 19:02:54 +0000 (20:02 +0100)]
pdtest: use less expensive Python routine to get text differences
Python ships with a difflib(3) module which is used in the pdtest(1)
utility. The Differ.compare() routine is rather expensive, especially
when the set of input text becomes "large" (a few thousand lines). Use
the less expensive unified_diff() routine instead which does not suffer
from that cost. From the sigrok-test perspective the resulting data is
as usable.
Gerhard Sittig [Sun, 8 Nov 2020 12:46:36 +0000 (13:46 +0100)]
parallel: add test case for parallel PD on SQI traffic
The parallel decoder can also be used to interpret SQI communication.
Using the chip select as the reset/enable signal increases robustness.
Implement a test case to cover this recently added decoder feature.
Gerhard Sittig [Sun, 8 Nov 2020 12:31:23 +0000 (13:31 +0100)]
parallel: expect demuxed words only after their items were seen
Catch up with the "parallel" decoder's implementation. Annotations for
demultiplexed words are sent after all their individual bits were seen.
Data content remains identical, this is exclusively about emission order.
Gerhard Sittig [Sun, 2 Aug 2020 19:17:16 +0000 (21:17 +0200)]
avr_isp: catch up with warning class for "unknown command" message
The decoder implementation moved the "Unknown command" message from the
PE annotation class (programming enable instruction) to warnings. Adjust
the test expectation.
Gerhard Sittig [Sun, 26 Jul 2020 06:53:16 +0000 (08:53 +0200)]
ir_nec: add tests for extended NEC protocol (failed and passed)
A capture with extended NEC protocol data became available. Add tests
for failed interpretation with the standard approach, and successful
interpretation when the extended protocol gets selected.
Add tests for the caliper decoder. Cover positive and negative numbers,
automatic millimeter and inch detection, and omitted annotations when
values haven't changed.
Gerhard Sittig [Sun, 22 Dec 2019 10:47:26 +0000 (11:47 +0100)]
ps2: add test for PS/2 data exchange without clock inhibit
The capture which was attached to bug #1460 demonstrated a previously
unhandled condition, the absence of a host activity after the data byte
transmission. Add another test case after the decoder implementation got
adjusted.
Gerhard Sittig [Sun, 22 Dec 2019 10:32:28 +0000 (11:32 +0100)]
ps2: adjust to recent implementation, stop ends at rising clock edge
Catch up with a recent change in the PS/2 decoder implementation. End
the STOP bit at the rising CLOCK edge already, don't expect a clock
inhibit phase after a data byte got transmitted.
Gerhard Sittig [Thu, 3 Oct 2019 01:53:30 +0000 (03:53 +0200)]
ieee488: introduce tests for unified IEEE-488 decoder (GPIB and IEC)
Test the visual annotations as well as binary and Python outputs for several
parallel GPIB captures (HP1631D, HP33120A, HP53131A, Keithley 2015) and the
serial IEC capture (CBM1571).
The "gpib_hp53131a_ton" capture does provide raw bytes, but its "payload"
data output really is empty in the current decoder's implementation. A
future implementation of the decoder may start flushing accumulated data
for currently unhandled conditions, too.