Relocate all test and ctest executables to bin/unit-test
Test binaries (naming: test_* | *_test | *_smoke | *Tests - 26 targets incl. the ctest-registered ones and pdmTests) now build into <build>/bin/unit-test/ instead of <build>/bin/. - CMakeLists: post-processing pass after all add_subdirectory calls sets RUNTIME_OUTPUT_DIRECTORY (overrides the legacy EXECUTABLE_OUTPUT_PATH) plus a 5-level $ORIGIN BUILD_RPATH entry (from bin/unit-test the RTI libs are one level further away than from bin/). Targets are collected by walking the SUBDIRECTORIES tree - the global TARGETS property is empty under CMake 4.x, which silently broke the first attempt. - add_test() uses $<TARGET_FILE:...>, so the ctest registry follows the new location without changes. - rpmbuild/make_rpm_ubuntu26*.py: test discovery points at build/bin/unit-test; the release2 runtime DEB mirrors the layout into usr/bin/unit-test/ so the test binaries stay in the package. - README: bin/unit-test/ documented in the output list and snippets. Verified (fresh /workspace-mount build): all 26 test executables in bin/unit-test/, ctest 20/22 (same 2 pre-existing out-of-scope failures), RUNPATH carries the 5-level $ORIGIN RTI entry and ddscore_unit_test runs from bin/unit-test with no LD_LIBRARY_PATH / RTI_LICENSE; app binaries in bin/ keep their 4-level entry.
This commit is contained in:
1 parent
dc2c3e358b
commit
9d0403817e
4 files changed
+63
-12
No files matched your search
@@ -95,7 +95,8 @@ Output to inspect after the run:
|
||||
|
||||
- `../build/release_build.log` — full make output (the build must end with
|
||||
**0 warnings**)
|
||||
- `../build/bin/` — executables (apps + test binaries)
|
||||
- `../build/bin/` — executables (apps)
|
||||
- `../build/bin/unit-test/` — test and ctest binaries
|
||||
- `../build/lib/` — shared libraries
|
||||
|
||||
To rebuild incrementally without a fresh tree, run `make` directly in an
|
||||
@@ -157,18 +158,18 @@ GUI-free tests need the offscreen Qt platform in a headless container:
|
||||
docker run --rm -it -v /path/to/pipeline-root:/workspace legatus-qt6:1.0 \
|
||||
bash -c 'export QT_QPA_PLATFORM=offscreen
|
||||
cd /workspace/qt-migration-legatus/qt6-after/build
|
||||
./bin/coprtcnv_unit_test # CoPrtCnv: telegrams, fragmentation, helpers
|
||||
./bin/logview_unit_test # LogView: IntegerCalculator
|
||||
./bin/prtcnv_unit_test # PrtCnv: PrtCnvMember fragmented-telegram handling
|
||||
./bin/lts_coord_trans_unit_test
|
||||
./bin/aes_crypt_test
|
||||
./bin/test_nglpdfwidget
|
||||
./bin/unit-test/coprtcnv_unit_test # CoPrtCnv: telegrams, fragmentation, helpers
|
||||
./bin/unit-test/logview_unit_test # LogView: IntegerCalculator
|
||||
./bin/unit-test/prtcnv_unit_test # PrtCnv: PrtCnvMember fragmented-telegram handling
|
||||
./bin/unit-test/lts_coord_trans_unit_test
|
||||
./bin/unit-test/aes_crypt_test
|
||||
./bin/unit-test/test_nglpdfwidget
|
||||
# or everything registered:
|
||||
ctest --output-on-failure'
|
||||
```
|
||||
|
||||
Each QtTest binary accepts a single slot name to run just one test,
|
||||
e.g. `./bin/coprtcnv_unit_test radioTelegramFragmentationRoundtrip`.
|
||||
e.g. `./bin/unit-test/coprtcnv_unit_test radioTelegramFragmentationRoundtrip`.
|
||||
|
||||
### 3.4 TetraIF unit tests (`TetraIF/unit-test/`)
|
||||
|
||||
|
||||
Reference in new issue
Block a user