Skip to content

Restructure Core/QA test harness to SciMLTesting v1.2 folder-discovery#385

Merged
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-qa-group-harness
Jun 16, 2026
Merged

Restructure Core/QA test harness to SciMLTesting v1.2 folder-discovery#385
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-qa-group-harness

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Restructure Core/QA to SciMLTesting v1.2 folder-discovery

This PR converts ComponentArrays' test harness from the explicit-args
run_tests(core=..., groups=..., qa=..., all=["Core"]) form to SciMLTesting
v1.2 folder-discovery mode. test/runtests.jl is now simply:

using SciMLTesting

run_tests()

This is a pure restructure — behavior is preserved exactly (verified locally
on Julia 1.10, the [compat] floor).

What changed

  • Core: deleted test/core_tests.jl. That file was a hand-written
    aggregator that @safetestset-included the 19 flat top-level test/*.jl
    files. Each of those files is self-contained (every one begins with
    include("shared/test_setup.jl")), so folder-discovery now picks them up as
    Core and runs each in its own isolated @safetestset (Core/<basename>) —
    identical isolation to what core_tests.jl did manually.
  • QA: deleted test/qa/qa.jl (a bare include("aqua_tests.jl"); include("jet_tests.jl") aggregator). Discovery now runs test/qa/aqua_tests.jl
    and test/qa/jet_tests.jl directly. Both files are already self-contained
    (each has its own using Aqua/using JET/using ComponentArrays/using Test), so no shared usings needed migrating.
  • All = Core only: the old all = ["Core"] excluded Autodiff/GPU/Downstream/
    Reactant from the "All" lane. In discovery mode this is expressed by setting
    in_all = false on each of those four groups in test/test_groups.toml
    (QA is auto-excluded from "All" by SciMLTesting). Each group's existing
    versions is unchanged.
  • test/shared/ is a helper folder (not declared in test_groups.toml, and a
    subdir rather than a top-level *.jl), so discovery auto-excludes it.

Local verification (Julia 1.10, SciMLTesting v1.2.0)

  • GROUP=Core: 19 discovered Core/* testsets, each run exactly once
    (no double-run), aggregate 459 Pass, 9 Broken, 468 Total — identical to the
    pre-change core_tests.jl run (459/9/468). The 9 Broken are pre-existing
    @test_brokens in broadcasting_tests.jl, untouched by this PR.
  • GROUP=QA: exactly 2 testsets — QA/aqua_tests.jl (9 Pass) and
    QA/jet_tests.jl (13 Pass), each once, all green.
  • GROUP=All: runs the 19 Core testsets only — zero
    Autodiff/GPU/Downstream/Reactant/QA testsets — confirming in_all = false
    works. Aggregate 459/9/468, matching Core.
  • GROUP=Autodiff (sanity): still dispatches its sub-env and runs
    Autodiff/autodiff_tests.jl (64 Pass), Core not run.

No tests were skipped, @test_broken/@test_skip-ed, loosened, or warnonly-ed.


Please ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

The v1.2 conversion (SciML#384) placed the QA group inside the `groups` Dict
passed to `run_tests`. SciMLTesting treats "QA" as a reserved group that
must be supplied via the dedicated `qa` keyword argument; with `qa` unset,
requesting `GROUP=QA` threw

    ArgumentError: run_tests: GROUP="QA" was requested but no `qa` body
    was provided

Move the QA spec out of `groups` and into the `qa` keyword.

Also add SafeTestsets and SciMLTesting (with compat) to test/qa/Project.toml.
The QA body runs in the activated qa env and is wrapped in @safetestset,
so that env must provide both packages, matching every other group env
(test/Project.toml, test/Autodiff, test/Downstream all declare them).

Verified locally on Julia 1.10 via the faithful CI path
(GROUP=QA Pkg.test("ComponentArrays")): QA group 22/22 passed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 16, 2026 08:51
Replace the explicit-args run_tests(core=..., groups=..., qa=..., all=["Core"])
with pure folder-discovery: test/runtests.jl is now just

    using SciMLTesting
    run_tests()

Behavior is preserved exactly:

- Core: delete test/core_tests.jl. The 19 self-contained top-level test/*.jl
  files (each begins with include("shared/test_setup.jl")) are discovered as
  Core, each run in its own isolated @safetestset (Core/<basename>) — identical
  isolation to what core_tests.jl did manually. Local Core run matches the
  pre-change aggregate exactly: 459 Pass, 9 Broken, 468 Total, each file once
  (no double-run).
- QA: delete test/qa/qa.jl so test/qa/{aqua_tests,jet_tests}.jl are discovered
  directly (qa.jl was a bare include-aggregator; both files are already
  self-contained with their own using Aqua/JET/ComponentArrays/Test, so no
  shared usings needed migrating). Each runs once: QA/aqua_tests.jl,
  QA/jet_tests.jl.
- All = Core only: the old all=["Core"] excluded Autodiff/GPU/Downstream/
  Reactant from the All lane. In discovery mode this is in_all = false on each
  of those four groups (QA is auto-excluded from All). Verified GROUP=All runs
  the 19 Core testsets only — no Autodiff/GPU/Downstream/Reactant/QA.

test/shared/ is a helper folder (not in test_groups.toml, a subdir not a
top-level *.jl) so discovery auto-excludes it. Existing per-group versions are
unchanged. GROUP=Autodiff still dispatches its sub-env (sanity-checked).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as draft June 16, 2026 09:16
@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title Fix QA test group harness wiring for SciMLTesting v1.2 Restructure Core/QA test harness to SciMLTesting v1.2 folder-discovery Jun 16, 2026
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 16, 2026 09:31
@ChrisRackauckas ChrisRackauckas merged commit 7c2d3ab into SciML:main Jun 16, 2026
21 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.

2 participants