diff options
Diffstat (limited to 'test/fixtures')
| -rw-r--r-- | test/fixtures/README.md | 47 | ||||
| -rw-r--r-- | test/fixtures/fst4_210115_0058.expected.txt | 4 | ||||
| -rw-r--r-- | test/fixtures/fst4w_201230_0300.expected.txt | 2 | ||||
| -rw-r--r-- | test/fixtures/ft4_000000_000002.expected.txt | 20 | ||||
| -rw-r--r-- | test/fixtures/ft8_210703_133430.expected.txt | 15 | ||||
| -rw-r--r-- | test/fixtures/ft8_210703_133430_mtd.expected.txt | 21 | ||||
| -rw-r--r-- | test/fixtures/jt4_OK1KIR_141105_175700.expected.txt | 2 | ||||
| -rw-r--r-- | test/fixtures/jt65_000000_0004.expected.txt | 2 | ||||
| -rw-r--r-- | test/fixtures/jt9_130418_1742.expected.txt | 7 | ||||
| -rw-r--r-- | test/fixtures/msk144_181211_120800.expected.txt | 3 | ||||
| -rw-r--r-- | test/fixtures/q65_300a_201210_0505.expected.txt | 2 | ||||
| -rw-r--r-- | test/fixtures/q65_30a_201203_024000.expected.txt | 2 | ||||
| -rw-r--r-- | test/fixtures/q65_60d_201212_1838.expected.txt | 2 | ||||
| -rw-r--r-- | test/fixtures/wspr_150426_0918.expected.txt | 10 |
14 files changed, 139 insertions, 0 deletions
diff --git a/test/fixtures/README.md b/test/fixtures/README.md new file mode 100644 index 00000000..f511c352 --- /dev/null +++ b/test/fixtures/README.md @@ -0,0 +1,47 @@ +# Golden fixtures + +Known-good decoder outputs captured at SHA `3b354122` (a commit with zero decoder changes relative to its parent). + +These fixtures are the regression baseline: any change that alters `jt9`'s or `wsprd`'s stdout byte-for-byte fails the harness in CI. The harness protects decoder behavior through the streaming I/O, NDJSON output, control frames, and wsprd streaming paths. + +## Current fixtures + +| Fixture | Input | Mode | Decodes | Captured from | +|---|---|---|---|---| +| `ft8_210703_133430.expected.txt` | `samples/FT8/210703_133430.wav` | FT8 (`-8`) | 14 signals | `3b354122` | +| `jt9_130418_1742.expected.txt` | `samples/JT9/130418_1742.wav` | JT9 (`-9`) | 6 signals | `3b354122` | +| `q65_30a_201203_024000.expected.txt` | `samples/Q65/30A_Ionoscatter_6m/201203_024000.wav` | Q65-30A (`--q65 -p 30 -f 1000 -d 3`) | 1 signal | K1JT, 2026-08-01 | +| `q65_300a_201210_0505.expected.txt` | `samples/Q65/300A_Optical_Scatter/201210_0505.wav` | Q65-300A (`--q65 -p 300 -f 1000 -d 3`) | 1 signal | K1JT, 2026-08-02 | +| `q65_60d_201212_1838.expected.txt` | `samples/Q65/60D_EME_10GHz/201212_1838.wav` | Q65-60D (`--q65 -b D -p 60 -f 1000 -d 3`) | 1 signal | K1JT, 2026-08-02 | +| `msk144_181211_120800.expected.txt` | `samples/MSK144/181211_120800.wav` | MSK144 (`--msk144 -p 15 -f 1500 -F 50 -d 3`) | 2 signals | K1JT, 2026-08-02 | +| `fst4_210115_0058.expected.txt` | `samples/FST4+FST4W/210115_0058.wav` | FST4 (`--fst4 -p 60 -f 1331 -L 1000 -H 1400 -d 3`) | 3 signals | K1JT, 2026-08-02 | +| `fst4w_201230_0300.expected.txt` | `samples/FST4+FST4W/201230_0300.wav` | FST4W (`--fst4w -p 1800 -f 1433 -F 100 -d 3`) | 1 signal | K1JT, 2026-08-02 | +| `ft4_000000_000002.expected.txt` | `samples/FT4/000000_000002.wav` | FT4 (`--ft4 -d 3`) | 19 signals | K1JT, 2026-08-02 | +| `jt65_000000_0004.expected.txt` | `samples/JT65/JT65B/000000_0004.wav` | JT65 (`--jt65 -b B -f 1700 -d 3`) | 1 signal | K1JT, 2026-08-02 | +| `jt4_OK1KIR_141105_175700.expected.txt` | `samples/JT4/JT4F/OK1KIR_141105_175700.WAV` | JT4-F (`--jt4 -b F -f 1200 -d 3`) | 1 signal | K1JT, 2026-08-02 | +| `wspr_150426_0918.expected.txt` | `samples/WSPR/150426_0918.wav` | WSPR (`wsprd`, no flags) | 9 signals | K1JT, 2026-08-02 | + +## Running + +Two independent ways to run these: + +- **Standalone script** (manual/local use, not itself CI-invoked): + ``` + cmake --build build --target jt9 wsprd + test/run-golden-fixtures.sh + ``` + Exits 0 on pass, 1 on regression. +- **ctest** (this is what CI actually runs): each fixture above is also registered as a `test_jt9_golden_*`/`test_wsprd_golden_*` test via `wsjt_add_jt9_golden_test`/`wsjt_add_wsprd_golden_test` in the top-level `CMakeLists.txt`, using `tests/integration/{jt9,wsprd}/compare_*_output.cmake` for an isolated, byte-exact comparison. These are gated to Linux x86-64 only (`ctest -R test_jt9_golden` / `test_wsprd_golden` to run just these) -- decoder output can drift in small ways across compilers/architectures, so the byte-exact check is pinned to one canonical platform; the other four CI legs still run everything else in `ctest`. + +## Adding a fixture + +1. Put the input `.wav` under `samples/<MODE>/` (already there for standard modes). +2. Run `./build/jt9 <flags> samples/<MODE>/<file>.wav > test/fixtures/<name>.expected.txt 2>&1` (or `./build/wsprd <flags> <file>.wav > ...` for WSPR). +3. Add a `run_fixture` call in `test/run-golden-fixtures.sh`, **and** a `wsjt_add_jt9_golden_test`/`wsjt_add_wsprd_golden_test` call in the top-level `CMakeLists.txt` -- the shell script alone does not run in CI. +4. Commit the expected file + both script/CMake changes together. + +## Coverage + +- FT8 + JT9 + Q65-30A + Q65-300A + Q65-60D + MSK144 + FST4 + FST4W + FT4 + JT65 + JT4 + WSPR fixtures above cover basic decoder regression. +- The streaming harnesses extend coverage to FST4 (`-7`), Q65 (`-3`), MSK144 (`-5`), and wsprd streaming. +- Streaming I/O parity: `test/run-stream-wav-parity.sh` validates that `jt9 --stream` decodes **contain** these expected decodes. The check is **containment, not identity**: streaming legitimately finds *more* signals (the early `nzhsym` passes pick up low-SNR signals) and the `snr`/`dt`/`freq` fields drift between the WAV and stream decode paths for the same signal (≈ ±2 dB / ±0.05 s / ±3 Hz — different fine estimates), so the decoded **message text** is the parity identity. FT8/JT9 only (FST4W has no good fixture; EME/JT65 I/Q paths are pass-on-absence). diff --git a/test/fixtures/fst4_210115_0058.expected.txt b/test/fixtures/fst4_210115_0058.expected.txt new file mode 100644 index 00000000..87c3c703 --- /dev/null +++ b/test/fixtures/fst4_210115_0058.expected.txt @@ -0,0 +1,4 @@ +0058 17 0.4 1331 ` CQ K9KFR EN71 +0058 -8 0.3 1101 ` CQ N5TM EL29 +0058 -29 0.4 1135 ` CQ N3HSK FM28 ? a1 +<DecodeFinished> 0 3 0 diff --git a/test/fixtures/fst4w_201230_0300.expected.txt b/test/fixtures/fst4w_201230_0300.expected.txt new file mode 100644 index 00000000..5565f4e9 --- /dev/null +++ b/test/fixtures/fst4w_201230_0300.expected.txt @@ -0,0 +1,2 @@ +0300 -44 0.3 1433 ` DL0HOT JO60 30 +<DecodeFinished> 0 1 0 diff --git a/test/fixtures/ft4_000000_000002.expected.txt b/test/fixtures/ft4_000000_000002.expected.txt new file mode 100644 index 00000000..647422bc --- /dev/null +++ b/test/fixtures/ft4_000000_000002.expected.txt @@ -0,0 +1,20 @@ +000002 -10 -0.2 296 + N1TRK N4FKH 569 VA +000002 -9 -0.4 422 + N1TRK KB7RUQ RR73 +000002 -7 -0.1 560 + CQ RU AB5XS EM12 +000002 -12 0.1 727 + NZ7P WA7JAY 589 CA +000002 16 0.3 1149 + KB0VHA KA1YQC R 539 MA +000002 -3 -0.2 1640 + CQ RU N9OY EN43 +000002 -11 0.2 1910 + K1JT WB4HXE 559 GA +000002 5 0.3 2067 + VE3LON K7RL R 549 WA +000002 -1 0.2 2310 + WD9IGY KX1X 73 +000002 -17 -0.4 2413 + W7BOB KJ7G RR73 +000002 -7 -0.3 2566 + NI6G W7DRW 569 AZ +000002 2 -0.3 2725 + K4SQC VE3RX RR73 +000002 -6 -0.4 2813 + CQ RU W1QA FN32 +000002 0 0.0 2995 + CQ RU WS4WW FM17 +000002 13 0.2 3159 + HB9BUN KG4W R 549 VA +000002 -8 0.4 3337 + W9TO KN3ILZ 529 PA +000002 -10 -0.3 520 + W9JA PY2APK RRR +000002 -15 0.2 2299 + AC6BW KR9A R 559 WI +000002 -13 -0.3 2560 + CQ RU W0FRC DM79 +<DecodeFinished> 0 19 0 diff --git a/test/fixtures/ft8_210703_133430.expected.txt b/test/fixtures/ft8_210703_133430.expected.txt new file mode 100644 index 00000000..03b27568 --- /dev/null +++ b/test/fixtures/ft8_210703_133430.expected.txt @@ -0,0 +1,15 @@ +133430 15 0.3 2571 ~ W1FC F5BZB -08 +133430 -2 -0.8 1197 ~ CQ F5RXL IN94 +133430 13 -0.1 2157 ~ WM3PEN EA6VQ -09 +133430 -13 0.3 590 ~ K1JT HA0DU KN07 +133430 -7 0.1 723 ~ A92EE F5PSR -14 +133430 -3 -0.1 2695 ~ K1BZM EA3GP -09 +133430 -13 0.3 641 ~ N1JFU EA6EE R-07 +133430 -3 0.2 466 ~ N1PJT HB9CQK -10 +133430 -7 0.4 2734 ~ W1DIG SV9CVY -14 +133430 -16 0.1 1649 ~ K1JT EA3AGB -15 +133430 -16 0.3 400 ~ W0RSJ EA3BMU RR73 +133430 -11 0.2 2855 ~ XE2X HA2NP RR73 +133430 -6 0.4 472 ~ KD2UGC F6GCP R-23 +133430 -7 0.2 2522 ~ K1BZM EA3CJ JN01 +<DecodeFinished> 0 14 0 diff --git a/test/fixtures/ft8_210703_133430_mtd.expected.txt b/test/fixtures/ft8_210703_133430_mtd.expected.txt new file mode 100644 index 00000000..78a17b08 --- /dev/null +++ b/test/fixtures/ft8_210703_133430_mtd.expected.txt @@ -0,0 +1,21 @@ +# Message identities are compared as a set; numeric metadata and order are informational. +133430 -9 0.1 723 ~ A92EE F5PSR -14 +133430 -7 -0.8 1196 ~ CQ F5RXL IN94 +133430 0 -0.1 2157 ~ WM3PEN EA6VQ -09 +133430 0 0.3 2571 ~ W1FC F5BZB -08 +133430 -14 0.3 641 ~ N1JFU EA6EE R-07 +133430 -13 0.3 2239 ~ N1API HA6FQ -23 +133430 -13 0.3 590 ~ K1JT HA0DU KN07 +133430 -12 0.3 465 ~ N1PJT HB9CQK -10 +133430 -11 -0.1 2695 ~ K1BZM EA3GP -09 +133430 -15 0.1 2279 ~ CQ EA2BFM IN83 +133430 -15 0.3 399 ~ W0RSJ EA3BMU RR73 +133430 -9 0.4 2734 ~ W1DIG SV9CVY -14 +133430 -15 0.1 1648 ~ K1JT EA3AGB -15 +133430 -18 0.7 1513 ~ N1API F2VX 73 +133430 -10 0.4 472 ~ KD2UGC F6GCP R-23 +133430 -14 0.2 2854 ~ XE2X HA2NP RR73 +133430 -18 0.1 2039 ~ K1JT HA5WA 73 +133430 -19 0.5 244 ~ K1BZM DK8NE -10 +133430 -12 0.2 2522 ~ K1BZM EA3CJ JN01 +133430 -15 -0.1 2546 ~ WA2FZW DL5AXX RR73 diff --git a/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt b/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt new file mode 100644 index 00000000..5add3711 --- /dev/null +++ b/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt @@ -0,0 +1,2 @@ +**** -14 1.8 1199 $# G3WDG OK1KIR RRR f +<DecodeFinished> 0 1 0 diff --git a/test/fixtures/jt65_000000_0004.expected.txt b/test/fixtures/jt65_000000_0004.expected.txt new file mode 100644 index 00000000..6a230c84 --- /dev/null +++ b/test/fixtures/jt65_000000_0004.expected.txt @@ -0,0 +1,2 @@ +0004 -26 2.5 1700 # K1ABC G4XYZ IO91 +<DecodeFinished> 0 1 0 diff --git a/test/fixtures/jt9_130418_1742.expected.txt b/test/fixtures/jt9_130418_1742.expected.txt new file mode 100644 index 00000000..147b44de --- /dev/null +++ b/test/fixtures/jt9_130418_1742.expected.txt @@ -0,0 +1,7 @@ +1742 -5 1.2 1505 @ JA1KAU PD0JAC -23 +1742 -25 0.0 1119 @ CQ GM7GAX IO75 +1742 -17 -0.0 1186 @ TF3G N7MQ CN84 +1742 -18 0.0 1224 @ K1JT KF4RWA 73 +1742 -22 0.1 1290 @ CQ M0WAY IO82 +1742 -13 0.0 1461 @ G7CNF N4HFA EL89 +<DecodeFinished> 0 6 0 diff --git a/test/fixtures/msk144_181211_120800.expected.txt b/test/fixtures/msk144_181211_120800.expected.txt new file mode 100644 index 00000000..484bae80 --- /dev/null +++ b/test/fixtures/msk144_181211_120800.expected.txt @@ -0,0 +1,3 @@ +120800 5 4.6 1458 & CQ W4IMD EM84 +120800 7 12.2 1496 & CQ KD9VV EN71 +<DecodeFinished> 0 0 0 diff --git a/test/fixtures/q65_300a_201210_0505.expected.txt b/test/fixtures/q65_300a_201210_0505.expected.txt new file mode 100644 index 00000000..b921120b --- /dev/null +++ b/test/fixtures/q65_300a_201210_0505.expected.txt @@ -0,0 +1,2 @@ +0505 -34 -0.6 1002 : VK7MO VK7PD QE38 q0 +<DecodeFinished> 0 1 1 diff --git a/test/fixtures/q65_30a_201203_024000.expected.txt b/test/fixtures/q65_30a_201203_024000.expected.txt new file mode 100644 index 00000000..d511c993 --- /dev/null +++ b/test/fixtures/q65_30a_201203_024000.expected.txt @@ -0,0 +1,2 @@ +024000 -18 0.3 1008 : K1JT K9AN R-16 q0 +<DecodeFinished> 0 1 1000 diff --git a/test/fixtures/q65_60d_201212_1838.expected.txt b/test/fixtures/q65_60d_201212_1838.expected.txt new file mode 100644 index 00000000..46216a00 --- /dev/null +++ b/test/fixtures/q65_60d_201212_1838.expected.txt @@ -0,0 +1,2 @@ +1838 -15 2.8 998 : VK7MO K6QPV DM12 q0 +<DecodeFinished> 0 1 1000 diff --git a/test/fixtures/wspr_150426_0918.expected.txt b/test/fixtures/wspr_150426_0918.expected.txt new file mode 100644 index 00000000..42ab2b7f --- /dev/null +++ b/test/fixtures/wspr_150426_0918.expected.txt @@ -0,0 +1,10 @@ +0918 -9 1.1 0.001446 0 ND6P DM04 30 +0918 -15 0.1 0.001460 0 W5BIT EL09 17 +0918 -23 2.2 0.001465 0 G8VDQ IO91 37 +0918 -6 0.6 0.001489 0 WD4LHT EL89 30 +0918 -1 -0.8 0.001503 0 NM7J DM26 30 +0918 -21 0.5 0.001517 0 KI7CI DM09 37 +0918 -18 -1.9 0.001530 0 DJ6OL JO52 37 +0918 -11 0.8 0.001587 0 W3HH EL89 30 +0918 -25 0.7 0.001594 0 W3BI FN20 30 +<DecodeFinished> |
