Gerhard Sittig [Mon, 23 Apr 2018 21:40:57 +0000 (23:40 +0200)]
dcf77: adjust test expectation (PD emits more "invalid" annotations)
The dcf77 decoder recently started emitting "invalid bit timing" and
"Invalid DCF77 bit number" annotations, and does display bit positions
of the 59th and subsequent pulse within a minute.
Gerhard Sittig [Sat, 10 Feb 2018 15:50:07 +0000 (16:50 +0100)]
ir_nec: add test for the optional carrier detect feature
The IR-NEC decoder optionally can handle input streams that still have
the carrier signal. Add a test for this configuration, derived from the
test which uses the signal that had the carrier removed in hardware.
The same data is seen, just at different sample numbers. The content was
verified by means of the "cut -d ' ' -f 2-" and "diff" commands.
Gerhard Sittig [Tue, 13 Feb 2018 19:45:34 +0000 (20:45 +0100)]
graycode: add test for stream without sample rate
Use a smaller input stream which lacks a samplerate spec. This results
in output that lacks the timing information (motion speed), but step
count and direction are identical to the other existing test.
Gerhard Sittig [Sat, 10 Feb 2018 18:04:35 +0000 (19:04 +0100)]
stepper_motor: add test for input stream without sample rate
The stepper motor decoder can still determine the steps' directions
and count. Missing input sample rates just prevent the decoder from
outputting speed annotations. All other decoder output is identical.
Gerhard Sittig [Sat, 10 Feb 2018 17:28:03 +0000 (18:28 +0100)]
i2s: add test for stream without sample rate
Use a smaller input stream which lacks a samplerate spec. This results
in identical decoder output (the existing test did not cover throughput
annotations).
Gerhard Sittig [Sat, 10 Feb 2018 16:22:01 +0000 (17:22 +0100)]
i2c: add test for input stream without sample rate (identical decoder output)
The existing test did not check the throughput annotation. Which is why
the decoder output is identical for input streams with and without a
sample rate specification.
Gerhard Sittig [Thu, 11 Jan 2018 06:05:34 +0000 (07:05 +0100)]
counter: use HD44780 dump to check counter's reset_edge option
Resetting counters depending on the LCD controller's R/S signal yields
numbers that correspond to byte sequences that either "control" hardware
(register access) or carry "data" (display text).
Provide a test case for the rising edge of RESET. Existing cases already
covered the falling edge of RESET which is the default.
Gerhard Sittig [Wed, 27 Dec 2017 16:50:14 +0000 (17:50 +0100)]
parallel: adjust hex number format of expected PD output
The parallel decoder got adjusted to emit annotations for "items" and
"words" in a unified format (consistent width, leading zeroes). Adjust
the test expectation to match the PD implementation.
Gerhard Sittig [Fri, 22 Dec 2017 18:00:43 +0000 (19:00 +0100)]
usb_power_delivery: fixup order of combined annotation text fragments
The USB power delivery decoder got adjusted to construct complex
annotations that consisted of several text fragments in a reproducible
order. Adjust the test expectation to match the PD implementation.
Gerhard Sittig [Sun, 18 Jun 2017 20:52:08 +0000 (22:52 +0200)]
onewire_network: Adjust test expectation for sample number fix in the PD
The start sample number of onewire network decoder annotations got fixed
in the decoder implementation (used to start one bit late). Catch up in
the test expectation.
Gerhard Sittig [Sun, 18 Jun 2017 20:15:29 +0000 (22:15 +0200)]
pwm: Adjust binary output test for sample number fix in the PD
The previous implementation used the period counter instead of the
period's actual start and end sample number. The implementation got
fixed, catch up in the test expectation.
Gerhard Sittig [Tue, 6 Jun 2017 21:09:44 +0000 (23:09 +0200)]
spi: Missing samplerate spec is not fatal
Remove the "exception_samplerate" test for the SPI decoder. Lack of a
samplerate specification only breaks the emission of the throughput
annotations, but still allows decoding the clocked signal.
Uwe Hermann [Mon, 5 Jun 2017 22:09:45 +0000 (00:09 +0200)]
Add support for initial pin settings.
Adapt all tests that require it to use the old behaviour of assuming an
initial pin value of 0 (or whatever was previously hardcoded in the PD).
for now (this will likely see some changes later).
Gerhard Sittig [Sun, 26 Feb 2017 16:37:22 +0000 (17:37 +0100)]
runtc: unbreak the protocol decoder output match logic (type vs instance)
Recent libsigrokdecode adjustment changed decoder output. The ID of a
protocol decoder instance need no longer match the decoder type's name
even for simple setups.
Lookup the selected decoder's instance ID during construction of the
decoder stack. Such that the selected decoder's data can get identified
in the output of the stack which is received by runtc(1).
Note that this implementation passes the decoder type's name to the
runtc(1) output file, so that it keeps matching the expected .output
files when pdtest(1) compares those two streams. This approach avoids
the necessity to adjust test.conf or .output files. It will no longer
be appropriate when more complex test configurations shall be supported
which involve multiple instances of the same decoder type or multiple
stacks of decoders.
Gerhard Sittig [Sun, 26 Feb 2017 18:12:05 +0000 (19:12 +0100)]
runtc: fixup coding style (conditionals, braces)
When a conditional has one complex branch (multiple instructions), both
branches are supposed to have braces around them. Instead of putting
extra braces around single instructions, eliminate the "else" branch
since the "if" branch already ends in break or return respectively.