diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:28 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:28 +0200 |
| commit | 69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch) | |
| tree | ebc98370a697a9bbd6b973a14fa5113c475c6db7 /tests/integration/jt9/smoke_decoder_callback.cmake | |
| parent | 3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff) | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg'
with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'tests/integration/jt9/smoke_decoder_callback.cmake')
| -rw-r--r-- | tests/integration/jt9/smoke_decoder_callback.cmake | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/integration/jt9/smoke_decoder_callback.cmake b/tests/integration/jt9/smoke_decoder_callback.cmake new file mode 100644 index 00000000..6a4e698f --- /dev/null +++ b/tests/integration/jt9/smoke_decoder_callback.cmake @@ -0,0 +1,47 @@ +foreach (required_variable JT9 SAMPLE EXPECTED_MESSAGE WORK_DIR SOURCE_DIR) + if (NOT DEFINED ${required_variable} OR "${${required_variable}}" STREQUAL "") + message (FATAL_ERROR "${required_variable} is required") + endif () +endforeach () + +file (MAKE_DIRECTORY "${WORK_DIR}") +set (actual_file "${WORK_DIR}/actual.txt") + +execute_process ( + COMMAND "${JT9}" + -a "${WORK_DIR}" + -t "${WORK_DIR}" + -r "${SOURCE_DIR}" + -8 + -d 1 + -x b + -L 1000 + -H 1400 + "${SAMPLE}" + WORKING_DIRECTORY "${WORK_DIR}" + RESULT_VARIABLE decoder_result + OUTPUT_VARIABLE decoder_stdout + ERROR_VARIABLE decoder_stderr) + +file (WRITE "${actual_file}" "${decoder_stdout}") + +if (NOT "${decoder_result}" STREQUAL "0") + message (FATAL_ERROR + "jt9 exited with ${decoder_result}\n" + "stdout:\n${decoder_stdout}\n" + "stderr:\n${decoder_stderr}") +endif () + +if (NOT "${decoder_stderr}" STREQUAL "") + message (FATAL_ERROR "jt9 wrote to stderr:\n${decoder_stderr}") +endif () + +string (FIND "${decoder_stdout}" "${EXPECTED_MESSAGE}" message_position) +string (FIND "${decoder_stdout}" "<DecodeFinished>" completion_position) +if (message_position LESS 0 OR completion_position LESS 0) + message (FATAL_ERROR + "jt9 did not complete the expected FT8 callback path\n" + "expected message: ${EXPECTED_MESSAGE}\n" + "actual:\n${decoder_stdout}\n" + "preserved output: ${actual_file}") +endif () |
