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.