Skip to content

[TEST] Use the class-test framework of the OpenMS core, drop the copy - #8

Draft
timosachsenberg wants to merge 1 commit into
developfrom
use-exported-testframework
Draft

timosachsenberg wants to merge 1 commit into
developfrom
use-exported-testframework

Conversation

@timosachsenberg

Copy link
Copy Markdown
Contributor

Description

OpenMS now exports its class-test framework in its CMake package, as the component TestFramework (OpenMS/OpenMS#11048, issue OpenMS/OpenMS#11034). This PR drops the copy of src/testframework and OpenMSTestSupport.cpp that this repository kept and uses the exported framework instead (−3700 lines).

  • cmake/find_openms.cmake requests TestFramework as an optional component.

  • The class tests link OpenMS::OpenMSTestSupport instead of the local OBJECT library. The target brings the framework library, OpenMS::OpenMS and the test setup: the fixed unique-ID seed and OpenMS exception names in failure reports. It compiles that setup into each test executable with the test's own flags. openms_gui/ builds its tests at -O0 without NDEBUG, so the setup now agrees with the tests automatically. The removed object library carried those flags itself.

  • With ENABLE_CLASS_TESTING=ON, configuring against a core without the framework fails with a message that names the remedies:

    • use the SDK or a full cmake --install of OpenMS;
    • install the components OpenMSTestFramework, OpenMSTestFramework_headers and cmake_testframework;
    • or turn the class tests off.

    I chose an error over leaving the tests out, so the class tests cannot disappear unnoticed. Packaging builds (PACKAGE_TYPE set) configure no tests and are unaffected.

  • .github/actions/openms-core installs the three framework components in its source mode. The SDK carries them from the first nightly built after the OpenMS merge (2026-12-06 14:02 UTC).

CI timing: PR CI uses the latest published nightly SDK by default. Until the first nightly that contains the OpenMS change is published (expected around 03:45 UTC on 2026-12-07), that SDK lacks the framework, so configure stops with the message above. To validate the change before then, the test workflow is dispatched on this branch with core_mode=source, which builds OpenMS develop.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • If this needs a change in OpenMS (OpenMS/OpenMS), the PR there is linked

AI disclosure: written with Claude Code (agentic); the commit carries a Co-authored-by: trailer. Not built locally: no OpenMS/Qt build is available in the session. CI is the test.


Generated by Claude Code

OpenMS now exports its class-test framework as the package component
TestFramework (OpenMS/OpenMS#11048, issue OpenMS/OpenMS#11034), so the copy of
src/testframework and of OpenMSTestSupport.cpp kept here is no longer needed.

- cmake/find_openms.cmake requests TestFramework as an optional component.
- The class tests link OpenMS::OpenMSTestSupport, which brings the framework,
  OpenMS::OpenMS and the test setup (fixed unique-ID seed, OpenMS exception
  names), compiled into each test with the test's own flags.
- With ENABLE_CLASS_TESTING, a core without the framework is refused at
  configure time with a message naming the remedies, instead of the class tests
  being dropped unnoticed. Builds with a PACKAGE_TYPE configure no tests and are
  unaffected.
- The source-built core of CI (.github/actions/openms-core) installs the three
  framework components; the SDK carries them from the first nightly built after
  the OpenMS change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmaLwgm7kqfDpQXyQYf

Copy link
Copy Markdown
Contributor Author

The build-and-test jobs on this PR fail at configure with the intended message (src/tests/CMakeLists.txt:127: The class tests (ENABLE_CLASS_TESTING) need the class-test framework of the OpenMS core…). PR CI builds against the latest published nightly SDK, folder 2026.12.06, which was built at 03:43 UTC, before OpenMS/OpenMS#11048 merged at 14:02 UTC. That SDK therefore has no TestFramework component yet.

The first nightly that includes it should be published around 03:45 UTC on 2026-12-07; re-running CI then should get past this point. Until then, the test workflow dispatched on this branch with core_mode=source, core_ref=develop and core_exact=true builds the core from current develop and validates the change: https://github.com/OpenMS/OpenMS-TOPP-GUI/actions/runs/47658772887


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Validation against an OpenMS core built from develop (which contains OpenMS/OpenMS#11048), via a workflow_dispatch run with core_mode=source, core_exact=true: all 5 jobs passed, class tests included. The PR checks themselves use the newest nightly SDK, which predates OpenMS#11048; they will be re-run once the 2026-12-07 nightly is published.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants