summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-10-14 14:39:20 +0200
committerChristoph Berg <myon@debian.org>2026-10-14 14:39:20 +0200
commitc576a4281ef8c87990ae6399393a827dfaccacd5 (patch)
tree0f28b7d1fc2ba73ccea5d7513281b0f8cae76fb6 /main.cpp
parentffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff)
New upstream version 3.3.0~beta2+dfsgupstream/3.3.0_beta2+dfsgupstream
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/main.cpp b/main.cpp
index d9546e48..594c851e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -297,6 +297,7 @@ int main(int argc, char *argv[])
bool jtty_tx_loopback_test {false};
bool ft8_tx_loopback_test {false};
bool receive_handoff_test {false};
+ bool jt4_wav_test {false};
bool jt9_wav_test {false};
bool jt65_wav_test {false};
bool q65_wav_test {false};
@@ -400,6 +401,14 @@ int main(int argc, char *argv[])
QStringList {} << "receive-handoff-test",
"Backlog two synthetic periods at the MainWindow receive boundary.");
parser.addOption (receive_handoff_test_option);
+ QCommandLineOption jt4_wav_test_option (
+ QStringList {} << "jt4-wav-test",
+ "Decode a JT4 WAV through the application and repeat the decode.", "wav-path");
+ parser.addOption (jt4_wav_test_option);
+ QCommandLineOption jt4_wav_expected_option (
+ QStringList {} << "jt4-wav-expected",
+ "Message that must appear during both JT4 WAV decodes.", "message");
+ parser.addOption (jt4_wav_expected_option);
QCommandLineOption jt9_wav_test_option (
QStringList {} << "jt9-wav-test",
"Decode a JT9 WAV through the application and repeat the decode.", "wav-path");
@@ -472,6 +481,7 @@ int main(int argc, char *argv[])
jtty_tx_loopback_test = parser.isSet (jtty_tx_loopback_test_option);
ft8_tx_loopback_test = parser.isSet (ft8_tx_loopback_test_option);
receive_handoff_test = parser.isSet (receive_handoff_test_option);
+ jt4_wav_test = parser.isSet (jt4_wav_test_option);
jt9_wav_test = parser.isSet (jt9_wav_test_option);
jt65_wav_test = parser.isSet (jt65_wav_test_option);
q65_wav_test = parser.isSet (q65_wav_test_option);
@@ -501,6 +511,13 @@ int main(int argc, char *argv[])
"must be used together" << std::endl;
return EXIT_FAILURE;
}
+ if (jt4_wav_test != parser.isSet (jt4_wav_expected_option)
+ || (jt4_wav_test && parser.value (jt4_wav_expected_option).trimmed ().isEmpty ()))
+ {
+ std::cerr << "--jt4-wav-test and a nonempty --jt4-wav-expected must be used together"
+ << std::endl;
+ return EXIT_FAILURE;
+ }
if (jt9_wav_test != parser.isSet (jt9_wav_expected_option)
|| (jt9_wav_test && parser.value (jt9_wav_expected_option).trimmed ().isEmpty ()))
{
@@ -540,7 +557,7 @@ int main(int argc, char *argv[])
+ (jtty_live_audio_test ? 1 : 0)
+ (jtty_tx_loopback_test ? 1 : 0)
+ (ft8_tx_loopback_test ? 1 : 0)
- + (receive_handoff_test ? 1 : 0) + (jt9_wav_test ? 1 : 0)
+ + (receive_handoff_test ? 1 : 0) + (jt4_wav_test ? 1 : 0) + (jt9_wav_test ? 1 : 0)
+ (jt65_wav_test ? 1 : 0) + (q65_wav_test ? 1 : 0) + (fst4_wav_test ? 1 : 0)
+ (fst4w_wav_test ? 1 : 0) > 1)
{
@@ -563,7 +580,7 @@ int main(int argc, char *argv[])
}
automated_test = startup_smoke_test || live_audio_test
|| jtty_live_audio_test || jtty_tx_loopback_test || ft8_tx_loopback_test
- || receive_handoff_test || jt9_wav_test || jt65_wav_test || q65_wav_test || fst4_wav_test || fst4w_wav_test;
+ || receive_handoff_test || jt4_wav_test || jt9_wav_test || jt65_wav_test || q65_wav_test || fst4_wav_test || fst4w_wav_test;
#else
automated_test = startup_smoke_test;
#endif
@@ -997,19 +1014,22 @@ int main(int argc, char *argv[])
controller->begin ();
});
}
- if (jt9_wav_test || jt65_wav_test || q65_wav_test || fst4_wav_test || fst4w_wav_test)
+ if (jt4_wav_test || jt9_wav_test || jt65_wav_test || q65_wav_test || fst4_wav_test || fst4w_wav_test)
{
a.setQuitOnLastWindowClosed (false);
wav_decode_controller.reset (new WavDecodeTestController {
- &w, parser.value (jt9_wav_test ? jt9_wav_test_option
+ &w, parser.value (jt4_wav_test ? jt4_wav_test_option
+ : jt9_wav_test ? jt9_wav_test_option
: jt65_wav_test ? jt65_wav_test_option
: q65_wav_test ? q65_wav_test_option
: fst4_wav_test ? fst4_wav_test_option : fst4w_wav_test_option),
- parser.value (jt9_wav_test ? jt9_wav_expected_option
+ parser.value (jt4_wav_test ? jt4_wav_expected_option
+ : jt9_wav_test ? jt9_wav_expected_option
: jt65_wav_test ? jt65_wav_expected_option
: q65_wav_test ? q65_wav_expected_option
: fst4_wav_test ? fst4_wav_expected_option : fst4w_wav_expected_option),
- jt9_wav_test ? WavDecodeTestController::Mode::Jt9
+ jt4_wav_test ? WavDecodeTestController::Mode::Jt4
+ : jt9_wav_test ? WavDecodeTestController::Mode::Jt9
: jt65_wav_test ? WavDecodeTestController::Mode::Jt65
: q65_wav_test ? WavDecodeTestController::Mode::Q65
: fst4_wav_test ? WavDecodeTestController::Mode::Fst4
@@ -1100,7 +1120,7 @@ int main(int argc, char *argv[])
{
result = EXIT_FAILURE;
}
- if ((jt9_wav_test || jt65_wav_test || q65_wav_test || fst4_wav_test || fst4w_wav_test)
+ if ((jt4_wav_test || jt9_wav_test || jt65_wav_test || q65_wav_test || fst4_wav_test || fst4w_wav_test)
&& (!wav_decode_controller || !wav_decode_controller->succeeded ()))
{
result = EXIT_FAILURE;