diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39ba04dfb8a76a778816c3af117dd1e821fff504..f5cc87f2d125e775ff36ee78a718226db396af2e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,7 +82,7 @@ variables: cache: - *meson-wrap-cache script: - - meson setup build -Dimpl_cpp=enabled ${BUILD_OPTIONS} + - meson setup build -Dimpl_cpp=enabled -Dimpl_py=disabled ${BUILD_OPTIONS} - meson compile -C build artifacts: paths: @@ -143,7 +143,7 @@ build:ubuntu-24.04: .test: stage: test script: - - meson test -C build --suite Constellation --no-rebuild --print-errorlogs + - meson test -C build --suite cxx --no-rebuild --print-errorlogs artifacts: reports: junit: build/meson-logs/testlog.junit.xml diff --git a/meson.build b/meson.build index bbeb13dc62bb60169cc046edfc59905c9f01f821..07af7557cbb2ddbadd5b56ce7df37beaf8e65de1 100644 --- a/meson.build +++ b/meson.build @@ -18,6 +18,7 @@ py = import('python').find_installation(required: get_option('impl_py')) impl_py = py.found() if impl_py subdir('python/constellation') + subdir('python/tests') endif # Tests diff --git a/python/tests/meson.build b/python/tests/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..afa3fde60120278f0424d31212d829746bb67b56 --- /dev/null +++ b/python/tests/meson.build @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: 2024 DESY and the Constellation authors +# SPDX-License-Identifier: CC0-1.0 + +# Process this subdir only when building Python implementation +if not impl_py + subdir_done() +endif + +pytest = find_program('pytest', required: true) + +test('CHIRP Broadcast Manager', + pytest, + args: [meson.current_source_dir() + '/test_broadcastmanager.py'], + suite: 'python', +) + +test('CHIRP Messages', + pytest, + args: [meson.current_source_dir() + '/test_chirp.py'], + suite: 'python', +) + +test('Command Receiver', + pytest, + args: [meson.current_source_dir() + '/test_cmd_receiver.py'], + suite: 'python', +) + +test('Satellite', + pytest, + args: [meson.current_source_dir() + '/test_satellite.py'], + suite: 'python', +) diff --git a/tests/meson.build b/tests/meson.build index 078bd678b9ee889e550502b9471d6c559952dd6c..0e00b20a606c5d5acbdb37b4816180de5ec5fbf6 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -15,6 +15,7 @@ test_core_chirp_broadcast = executable('test_core_chirp_broadcast', test('Core CHIRP broadcast test', test_core_chirp_broadcast, args: ['--durations', 'yes', '--verbosity', 'high'], is_parallel: false, + suite: 'cxx', ) test_core_chirp_manager = executable('test_core_chirp_manager', @@ -24,6 +25,7 @@ test_core_chirp_manager = executable('test_core_chirp_manager', test('Core CHIRP manager test', test_core_chirp_manager, args: ['--durations', 'yes', '--verbosity', 'high'], is_parallel: false, + suite: 'cxx', ) test_core_chirp_message = executable('test_core_chirp_message', @@ -32,6 +34,7 @@ test_core_chirp_message = executable('test_core_chirp_message', ) test('Core CHIRP message test', test_core_chirp_message, args: ['--durations', 'yes', '--verbosity', 'high'], + suite: 'cxx', ) # Core / Logging @@ -43,6 +46,7 @@ test_core_logging = executable('test_core_logging', test('Core logging test', test_core_logging, args: ['--durations', 'yes', '--verbosity', 'high'], is_parallel: false, + suite: 'cxx', ) # Core / Message @@ -53,6 +57,7 @@ test_core_message = executable('test_core_message', ) test('Core message test', test_core_message, args: ['--durations', 'yes', '--verbosity', 'high'], + suite: 'cxx', ) # Satellite @@ -62,5 +67,6 @@ test_satellite_fsm = executable('test_satellite_fsm', dependencies: [satellite_dep, catch2_dep], ) test('Satellite FSM test', test_satellite_fsm, - args: ['--durations', 'yes', '--verbosity', 'high'], + args: ['--durations', 'yes', '--verbosity', 'high'], + suite: 'cxx', )