Skip to content

ci: run Linux tests in parallel, skip unit suites in the ladder ASan leg, gate the install self-test - #1174

Merged
Yaraslaut merged 3 commits into
masterfrom
ci/faster-sanitizer-ci
Nov 27, 2026
Merged

Yaraslaut merged 3 commits into
masterfrom
ci/faster-sanitizer-ci

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

Summary

Cuts the jobs that set a pull request's wall time. On master's last green run (CI 45369799802) these were: Application ladder / ASan+UBSan 108 min (build 87), clang-asan 87 min (test 56), consumability 86 min (self-test 61).

  • Linux ctest runs in parallel (--parallel "$(nproc)") on every Linux test step. catch_discover_tests makes each case its own process, so serial runs are mostly process start-up: clang-asan's 5,689 cases took 3,391 s one at a time. Tests that share a resource already declare RESOURCE_LOCK (the ladder DB) or RUN_SERIAL.
  • MORPH_BUILD_UNIT_TESTS (default ON, documented in docs/BUILDING.md) gates everything under tests/ itself. The ladder's ASan leg sets it OFF. It runs only the ladder and Qt transport suites, and morph_tests + morph_table_tests were 302 of its 862 compiles; clang-asan builds and runs them under the same sanitizers. The plain ladder leg keeps them for its ctest name-collision check.
  • The consumability self-test is path-gated on pull requests. It rebuilds morph nine times to test the checker, so it runs only when the checker, its self-test, CMakeLists.txt/cmake/, ci.yml, or a header its mutations name changed. Master pushes always run it, and the install/consumer check itself still runs on every PR.

Verification

  • Local clang-asan build of this branch, full suite with the CI exclusion (-E "OomInjector|morph#108") at --parallel 4: 4,911/4,911 passed in 3 of 3 runs (690 s, 686 s, 711 s). This machine is faster than a hosted runner, so CI's absolute times will differ.
  • Ladder ASan configure with -DMORPH_BUILD_UNIT_TESTS=OFF (Qt 6.8.1): configures. morph_tests and morph_table_tests are absent; ladder_lims_tests, ladder_bank_tests, morph_qt_tests and morph_qt_tls_example are present.

Not verified locally: TSan, UBSan and coverage under --parallel, and the ladder suites in parallel (they share RESOURCE_LOCK morph_ladder_test_db). This PR's own CI run is the first measurement of those.

Follow-ups (not in this PR)

🤖 Generated with Claude Code

https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb

… ASan leg, and the install self-test where nothing it reads changed

Three changes to the jobs that set a pull request's wall time on master's
last green run (CI 45369799802): Application ladder / ASan+UBSan 108 min,
clang-asan 87, consumability 86.

- Every Linux ctest runs one test per CPU. catch_discover_tests makes each
  case its own process, so a serial run is mostly process start-up: the asan
  leg's 5,689 cases took 3,391 s one at a time. Locally the clang-asan suite
  (4,911 cases, the OomInjector exclusion applied) passed three runs out of
  three at --parallel 4, in 686-711 s. Tests sharing a resource already say
  so with RESOURCE_LOCK or RUN_SERIAL.
- MORPH_BUILD_UNIT_TESTS (default ON) gates everything under tests/ itself.
  The ladder's ASan leg turns it off: it runs the ladder and the Qt transport
  suites only, and morph_tests and morph_table_tests were 302 of its 862
  compiles; clang-asan builds and runs them under the same sanitizers. The
  plain ladder leg keeps them, since its name-collision check covers every
  ctest test.
- The consumability job's self-test builds morph from scratch nine times
  (61 min). It tests the checker, so a pull request runs it only when the
  checker, its self-test, the build and install rules, or a header its
  mutations name changed; a master push always runs it. The install check
  itself still runs on every pull request.

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

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Yaraslaut and others added 2 commits November 27, 2026 00:01
…net channel conformance a TSan-sized wait

Under parallel ctest the check's reply could run inside the click's settle and mount the draft before the view was
reopened; pressing Preview without running the owner keeps the reply queued until the view is reopened. The net
channel fixture waited the default two seconds for 50 socket events, which TSan on a loaded runner can exceed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb
The two tests that inspect the source view while a check runs relied on the reply not arriving within the click's
settle. Under parallel ctest it sometimes did. They now occupy the test server's pool threads until they have looked,
so the reply waits for the release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb
@Yaraslaut
Yaraslaut merged commit dbc812a into master Nov 27, 2026
34 checks passed
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.

1 participant