Repository navigation
[TEST] Relocation test: close three ways it could pass without checking anything - #10195
Conversation
…ng anything Review findings on #10186. The run-time check looked only at libOpenMS, although the configure-time half checks both imported targets. Each library is resolved by the loader in its own right, so an RPATH that sends libOpenSwathAlgo back to the build tree -- which the install RPATH of a macOS build names outright -- left the program printing success. It now checks both, and takes their file names from $<TARGET_FILE_NAME:...> of the imported targets instead of guessing "libOpenMS" and "OpenMS" in C++, so a SOVERSION, an OUTPUT_NAME or a debug postfix changes what is looked for along with what is built rather than failing on Windows only, with a message about a module that cannot be found. An unset INTERFACE_INCLUDE_DIRECTORIES was turned into an empty loop, so an export that drops the install include interface skipped the assertions without a word -- and the build step would not have caught it either, since the program includes no OpenSwathAlgo header. It is a hard error now, like the neighbouring IMPORTED_CONFIGURATIONS check. In the test driver, an empty or omitted COMPONENTS silently produced a chain that installs nothing and then runs the consumer against whatever a previous run left in the prefix; it is rejected like any other bad argument. The prefix is now emptied before every run of every chain rather than only the relocating one: `cmake --install --component` only adds files, so a component dropped from COMPONENTS left the files of an earlier run behind, and since OpenMSConfig.cmake reports a layer from the presence of its target file, the consumer kept finding a layer the installation no longer installs. Finally, the install steps of all chains take one resource lock: they install from the same build tree, where each `cmake --install --component <c>` writes install_manifest_<c>.txt, so concurrent installs interleave in that file and contend for throughput instead of gaining from it -- `ctest -L installed_consumer -j6` drops from 18.2 s to 2.2 s. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BbTygAEhdouMboSggp3etK
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughChangesInstalled Test Validation
Priority: ⬇️ Low Change: Other Merge Risk: ⚪ Minimal · up to No actionable risk remains in the installed-consumer test changes; the PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the paths at night Comment |
Description
Follow-up to #10186 (the relocation test) from a review of it. No behaviour of OpenMS itself changes; this is all test scaffolding. Six findings, in two groups.
Three ways the relocation test could pass while checking nothing
libOpenMS, although the configure-time half checks both imported targets. Each library is resolved by the loader in its own right, so an RPATH that sendslibOpenSwathAlgoback to the build tree — whichCMAKE_INSTALL_RPATHfor a macOS build names outright — left the program printing success. It now checks both."libOpenMS","OpenMS"). They now come from$<TARGET_FILE_NAME:...>of the imported targets, so aSOVERSION, anOUTPUT_NAMEor a debug postfix changes what is looked for along with what is built, instead of failing on Windows only with a message about a module that cannot be found.openms_package_include_dirs()from [FIX][TEST] Resolve the package's include directories before checking them #10192 returns an empty list for a target whose property is unset, and the loop below then checks nothing — which the build would not catch either, since the program includes no OpenSwathAlgo header.Three in the test driver (
_openms_add_installed_consumer_tests), which affect all three consumer chains:COMPONENTSsilently produced a chain that installs nothing and then runs the consumer against whatever a previous run left in the prefix.set_tests_properties()on an empty list is a no-op, so nothing said so. It is rejected like any other bad argument now.cmake --install --componentonly ever adds files, so a component dropped fromCOMPONENTSleft the files of an earlier run behind — and sinceOpenMSConfig.cmakereports a layer from the presence of its target file, the consumer kept finding a layer the installation no longer installs.cmake --install --component <c>writesinstall_manifest_<c>.txt, so concurrent installs interleave in that file and contend for throughput rather than gaining from it.Verification
Built against system dependencies (Arrow 25, Boost 1.83, Xerces, CoinOR, libsvm, Eigen) with
OPENMS_TEST_INSTALLED_CONSUMER=ON, on this branch:ctest -L installed_consumer -j6→ 40/40 pass.ctest -L installed_consumer -j6wall time 18.2 s → 2.2 s with the resource lock, i.e. the lock removes contention rather than adding serialisation cost.Each fix was also made to fail on purpose, so none of them is decorative:
libOpenSwathAlgoloaded from elsewhereLD_LIBRARY_PATHholding only a build-treelibOpenSwathAlgo.so,libOpenMSstill correct → exits 1 naming both pathsopenms_package_include_dirs()against an imported target with none →FATAL_ERRORBASE_DIRSrepointed in the installed export →FATAL_ERRORCOMPONENTSCOMPONENTS ""→FATAL_ERRORinstalled-consumer/prefixandprefix-core→ gone after the runOne review finding is deliberately not here: the duplicated
OPENMS_LIB_DIR/IMPORTED_LOCATIONblock betweenrelocated/CMakeLists.txtandexternal/CMakeLists.txt. #10192 has since introducedopenms_package_include_dirs.cmakeas a shared helper for these projects, which is the natural home for that too, but it is a separate change.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01BbTygAEhdouMboSggp3etK
Generated by Claude Code
Summary by CodeRabbit