Skip to content

Use SciMLTesting v1.2 (folder-based run_tests)#89

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:sciml-testing-rollout
Jun 14, 2026
Merged

Use SciMLTesting v1.2 (folder-based run_tests)#89
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:sciml-testing-rollout

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Contributor

Replaces the hand-written GROUP-dispatch ladder in test/runtests.jl with a single SciMLTesting.run_tests() call in v1.2 folder-discovery mode.

What changed

test/runtests.jl → exactly:

using SciMLTesting
run_tests()

Folder layout (folder name matches the test_groups.toml key, case-insensitively):

  • Core = top-level test/*.jl. The inline @safetestset blocks that previously lived in the if GROUP == "All" || GROUP == "Core" branch move verbatim (dedented) into test/core_tests.jl. Core runs in the main test env (no activation). Runs for GROUP=Core and GROUP=All, as before.
  • QA = test/qa/ with its existing test/qa/Project.toml. qa_tests.jl is discovered and run in its sub-env (activate_group_env develops the repo root + instantiates). A declared sub-env means QA runs only for GROUP=QA and never under All — matching the original if GROUP == "QA" branch exactly.

Project.toml:

  • Add SciMLTesting to [extras]/[targets].test/[compat] = "1" and keep SafeTestsets/StableRNGs/Test.
  • Drop Pkg from [extras]/[targets].test/[compat] — it was only used by the removed activate_qa_env helper (grep of test/ confirms no other use); the v1.2 harness owns all Pkg ops.

test/qa/Project.toml:

  • Add SciMLTesting (compat "1") and SafeTestsets (compat "0.0.1, 0.1") — qa_tests.jl runs under a @safetestset wrapper in the qa sub-env.

test/test_groups.toml is unchanged.

Verification (local, Julia 1.11)

  • TOML.parsefile on every Project.toml + test_groups.toml; Meta.parseall on runtests.jl + core_tests.jl + qa_tests.jl (no :error nodes).
  • core_tests.jl is byte-identical to the dedented original Core block (17 @safetestset blocks).
  • Folder-discovery resolves Core → core_tests.jl, QA → qa/qa_tests.jl (sub-env), All → Core only.
  • End-to-end run_tests(): GROUP=Core → 105036/105036 pass; GROUP=QA → 46/46 pass (exercises the qa sub-env activation path).

Behavior-preserving: the exact set of tests run under each GROUP value is unchanged.

Ignore until reviewed by @ChrisRackauckas.

Replace the hand-written GROUP-dispatch ladder in test/runtests.jl with a
single SciMLTesting.run_tests() call in folder-discovery mode.

- runtests.jl becomes `using SciMLTesting; run_tests()`.
- Core: the inline @safetestset blocks move verbatim to top-level
  test/core_tests.jl (Core = top-level test/*.jl, main test env).
- QA: test/qa/qa_tests.jl stays in its sub-env (test/qa/Project.toml),
  discovered + activated automatically (runs only for GROUP=QA, never
  under All — matches the old `if GROUP == "QA"` branch).
- Root Project.toml: add SciMLTesting (+compat "1") and SafeTestsets to
  test deps; drop Pkg (only the removed activate_qa_env used it).
- test/qa/Project.toml: add SciMLTesting + SafeTestsets (qa_tests.jl runs
  under a @safetestset wrapper in the qa sub-env).
- test_groups.toml unchanged.

Behavior-preserving: GROUP=Core/All run the same Core tests, GROUP=QA runs
qa_tests.jl in the qa env. Verified end-to-end on Julia 1.11
(Core 105036/105036 pass, QA 46/46 pass).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title Use SciMLTesting v1.0.0 (run_tests harness) Use SciMLTesting v1.2 (folder-based run_tests) Jun 14, 2026
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 14, 2026 23:54
@ChrisRackauckas ChrisRackauckas merged commit cc6f5a0 into SciML:main Jun 14, 2026
22 of 23 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