blob: 80550b4511578824ef2c7dfb0519c276ea3d043f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
add_executable (test_bwf_file test_bwf_file.cpp)
target_link_libraries (test_bwf_file wsjt_qtmm wsjt_qt Qt5::Test Qt5::Multimedia)
add_test (NAME test_bwf_file COMMAND test_bwf_file)
if (WSJT_ENABLE_TSAN)
set_tests_properties (test_bwf_file PROPERTIES
ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
endif ()
if (WSJT_BUILD_UTILS)
add_executable (test_echosim_wav_trailer test_echosim_wav_trailer.cpp)
target_link_libraries (test_echosim_wav_trailer wsjt_qtmm Qt5::Test Qt5::Multimedia)
target_compile_definitions (test_echosim_wav_trailer PRIVATE
ECHOSIM_EXECUTABLE="$<TARGET_FILE:echosim>")
add_dependencies (test_echosim_wav_trailer echosim)
add_test (NAME test_echosim_wav_trailer COMMAND test_echosim_wav_trailer)
endif ()
add_executable (test_wav_input_loading
test_wav_input_loading.cpp
${CMAKE_SOURCE_DIR}/Audio/WavInputLoader.cpp)
target_link_libraries (test_wav_input_loading
wsjt_qtmm wsjt_qt wsjt_fort_common Qt5::Test Qt5::Multimedia)
add_test (NAME test_wav_input_loading COMMAND test_wav_input_loading)
add_executable (test_wav_load_coordinator
test_wav_load_coordinator.cpp
${CMAKE_SOURCE_DIR}/Audio/WavLoadCoordinator.cpp)
target_link_libraries (test_wav_load_coordinator wsjt_qt Qt5::Test)
add_test (NAME test_wav_load_coordinator COMMAND test_wav_load_coordinator)
set_tests_properties (test_wav_load_coordinator PROPERTIES TIMEOUT 15)
add_executable (test_tx_playback_diagnostics
test_tx_playback_diagnostics.cpp
${CMAKE_SOURCE_DIR}/Audio/TxPlaybackDiagnostics.cpp)
target_link_libraries (test_tx_playback_diagnostics Qt5::Core Qt5::Test)
add_test (NAME test_tx_playback_diagnostics COMMAND test_tx_playback_diagnostics)
add_executable (test_tx_request test_tx_request.cpp)
target_link_libraries (test_tx_request Qt5::Test)
add_test (NAME test_tx_request COMMAND test_tx_request)
add_executable (test_tx_audio_queue
test_tx_audio_queue.cpp
${CMAKE_SOURCE_DIR}/Audio/TxAudioQueue.cpp
${CMAKE_SOURCE_DIR}/Modulator/JttyPcmFifo.cpp)
target_link_libraries (test_tx_audio_queue Qt5::Core Qt5::Test)
add_test (NAME test_tx_audio_queue COMMAND test_tx_audio_queue)
add_executable (test_audio_input_stream_descriptor
test_audio_input_stream_descriptor.cpp
${CMAKE_SOURCE_DIR}/Audio/AudioDevice.cpp
${CMAKE_SOURCE_DIR}/Audio/AudioInputSource.hpp
${CMAKE_SOURCE_DIR}/Audio/FixtureAudioInput.cpp
${CMAKE_SOURCE_DIR}/DecDataMutex.cpp
${CMAKE_SOURCE_DIR}/Detector/Detector.cpp)
target_link_libraries (test_audio_input_stream_descriptor
wsjt_qtmm Qt5::Core Qt5::Test Qt5::Multimedia)
add_test (NAME test_audio_input_stream_descriptor
COMMAND test_audio_input_stream_descriptor)
add_executable (test_sound_input
test_sound_input.cpp
${CMAKE_SOURCE_DIR}/Audio/AudioDevice.cpp
${CMAKE_SOURCE_DIR}/Audio/AudioInputSource.hpp
${CMAKE_SOURCE_DIR}/Audio/soundin.cpp
${CMAKE_SOURCE_DIR}/Logger.cpp)
target_link_libraries (test_sound_input
wsjt_qtmm wsjt_qt Boost::log_setup Qt5::Test Qt5::Multimedia)
add_test (NAME test_sound_input COMMAND test_sound_input)
add_executable (test_receive_audio_handoff
test_receive_audio_handoff.cpp
receive_reference_probe.f90
${CMAKE_SOURCE_DIR}/Audio/AudioDevice.cpp
${CMAKE_SOURCE_DIR}/DecDataMutex.cpp
${CMAKE_SOURCE_DIR}/Detector/Detector.cpp)
target_link_libraries (test_receive_audio_handoff
wsjt_fort_common Qt5::Core Qt5::Test Qt5::Multimedia)
target_include_directories (test_receive_audio_handoff PRIVATE ${CMAKE_BINARY_DIR})
set (receive_handoff_scenarios
block_size_changes_preserve_captured_partial_audio
continuous_end_overflow_keeps_original_session
continuous_detached_batch_excludes_later_publications
continuous_receive_preserves_partial_block_across_clock_wrap
continuous_stop_flushes_only_captured_downsampled_audio
continuous_mailbox_overrun_is_explicit_and_rearms_notification
downsamplersRetainIndependentHistory
producersRemainIsolatedAcrossSourceSwitch
queued_prefix_without_reuse
handoff_rejects_gaps_and_disk_stale_work
queued_period_must_retain_identity
reference_input_packetization
echo_metadata_vs_append
echo_metadata_vs_reset
stale_echo_metadata_must_not_modify_next_period)
add_test (NAME test_receive_audio_handoff
COMMAND test_receive_audio_handoff ${receive_handoff_scenarios})
# refspectrum has saved accumulation state, so keep DSP cases in fresh
# processes.
set (receive_handoff_isolated_scenarios
reference_measurement_vs_append
reference_measurement_vs_reset
reference_application_preserves_uncommitted_suffix
reference_application_packetization
reference_measurement_packetization)
set (receive_handoff_tests test_receive_audio_handoff)
foreach (scenario IN LISTS receive_handoff_isolated_scenarios)
add_test (NAME test_receive_${scenario}
COMMAND test_receive_audio_handoff ${scenario})
list (APPEND receive_handoff_tests test_receive_${scenario})
endforeach ()
set_tests_properties (${receive_handoff_tests} PROPERTIES
TIMEOUT 30 LABELS "receive-handoff")
if (WSJT_ENABLE_TSAN)
# Do not inherit GUI event-dispatch suppressions: they can hide the very
# application callback accesses that these tests are intended to expose.
set_tests_properties (${receive_handoff_tests} PROPERTIES
ENVIRONMENT "TSAN_OPTIONS=halt_on_error=1:exitcode=66")
# Reference file I/O triggers a libgfortran-internal lock-order warning.
set_tests_properties (
test_receive_reference_application_preserves_uncommitted_suffix
test_receive_reference_application_packetization
test_receive_reference_measurement_packetization PROPERTIES
ENVIRONMENT "TSAN_OPTIONS=halt_on_error=1:exitcode=66:detect_deadlocks=0")
endif ()
add_executable (test_fast_decode_ownership
test_fast_decode_ownership.cpp
${CMAKE_SOURCE_DIR}/FastDecode.cpp
${CMAKE_SOURCE_DIR}/Audio/AudioDevice.cpp
${CMAKE_SOURCE_DIR}/DecDataMutex.cpp
${CMAKE_SOURCE_DIR}/Detector/Detector.cpp)
target_link_libraries (test_fast_decode_ownership
wsjt_fort_common Qt5::Core Qt5::Test Qt5::Multimedia)
target_include_directories (test_fast_decode_ownership PRIVATE ${CMAKE_BINARY_DIR})
add_test (NAME test_fast_decode_ownership COMMAND test_fast_decode_ownership
captures_submission_inputs capture_does_not_race_live_append
overlapping_jobs_retain_submission_identity)
set_tests_properties (test_fast_decode_ownership PROPERTIES
TIMEOUT 30 LABELS "receive-handoff;fast-decode-ownership")
if (WSJT_ENABLE_TSAN)
add_test (NAME test_fast_decode_overlap_does_not_race_decoder
COMMAND test_fast_decode_ownership
overlapping_submission_does_not_race_decoder)
set_tests_properties (test_fast_decode_ownership
test_fast_decode_overlap_does_not_race_decoder PROPERTIES
TIMEOUT 30 LABELS "receive-handoff;fast-decode-ownership"
ENVIRONMENT "TSAN_OPTIONS=halt_on_error=1:exitcode=66")
endif ()
|