Skip to content

Use SciMLTesting v1.2 (run_tests)#58

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:canonicalize-safetestset
Jun 14, 2026
Merged

Use SciMLTesting v1.2 (run_tests)#58
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:canonicalize-safetestset

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Contributor

Converts test/runtests.jl to SciMLTesting v1.2.

Why explicit-args (not bare folder-discovery)

This repo's group semantics cannot be expressed by v1.2 folder-discovery:

  • The Enzyme and Mooncake test groups run only under "All" in the old runtests.jl, yet are not declared in test_groups.toml (which lists only Core and nopre). Folder-discovery's "All" = Core + declared in-all groups, so it cannot pull in groups absent from test_groups.toml — and the spec requires leaving test_groups.toml unchanged.
  • The BigFloat and UnionAll testsets were appended to runtests.jl with no GROUP guard, so they run under both Core and nopre. Folder-discovery has no "run this file in multiple groups" mechanism.

So runtests.jl uses run_tests in explicit-args mode (the v1.2 backward-compatible path, same shape as RecursiveArrayTools.jl / OrdinaryDiffEq.jl) with explicit core/groups bodies and a curated all = ["Core", "Enzyme", "Mooncake"].

Layout

  • Core = test/basictests.jl + test/shared/bigfloat_unionall_tests.jl
  • nopre = test/nopre/jet_tests.jl (sub-env, test/nopre/Project.toml) + the shared BigFloat/UnionAll file
  • Enzyme = test/Enzyme/enzyme_tests.jl (main test env)
  • Mooncake = test/Mooncake/mooncake_tests.jl (main test env)
  • test/shared/ holds the BigFloat/UnionAll testsets, included by both the Core and nopre bodies.

Deps

  • Root [extras]/[targets].test + [compat]: add SciMLTesting + SafeTestsets; keep Enzyme/EnzymeCore/Mooncake/Test; drop the unused Pkg test extra (the harness owns all Pkg ops).
  • test/nopre/Project.toml: add SciMLTesting + SafeTestsets + a relative [sources] to the repo root.
  • Removed the stale committed test/nopre/Manifest.toml — the harness regenerates it at run time via Pkg.develop + Pkg.instantiate (as the old runtests.jl did).
  • test/test_groups.toml unchanged.

Verification

Behavior-preserving for every CI-reachable GROUP. Ran locally on Julia 1.11 via Pkg.test:

GROUP tests
Core basictests (48) + BigFloat/UnionAll (7)
nopre JET (7) + BigFloat/UnionAll (7)
All basictests (48) + BigFloat/UnionAll (7, once) + Enzyme (65) + Mooncake (13)

(The standalone GROUP=Enzyme/GROUP=Mooncake lanes no longer also run the unconditional BigFloat/UnionAll testsets, but those GROUP values are not in test_groups.toml and are never invoked by CI.)

This supersedes the earlier @safetestset canonicalization on this branch (which had dropped the Enzyme/Mooncake groups entirely).

Ignore until reviewed by @ChrisRackauckas.

Convert test/runtests.jl to SciMLTesting v1.2. This repo needs the
explicit-args form (not bare folder-discovery): the Enzyme/Mooncake test
groups run only under "All" yet are not declared in test_groups.toml, and the
BigFloat/UnionAll testsets must run under both Core and nopre. Folder-discovery
cannot express either, so runtests.jl uses run_tests with explicit core/groups
bodies and a curated all = ["Core", "Enzyme", "Mooncake"].

Layout:
- Core = test/basictests.jl + test/shared/bigfloat_unionall_tests.jl
- nopre = test/nopre/jet_tests.jl (sub-env) + the shared BigFloat/UnionAll file
- Enzyme = test/Enzyme/enzyme_tests.jl (main env)
- Mooncake = test/Mooncake/mooncake_tests.jl (main env)

Behavior-preserving for every CI-reachable GROUP (verified locally on Julia
1.11 via Pkg.test):
- Core  -> basictests (48) + BigFloat/UnionAll (7)
- nopre -> JET (7) + BigFloat/UnionAll (7)
- All   -> basictests (48) + BigFloat/UnionAll (7, once) + Enzyme (65) + Mooncake (13)

Deps: add SciMLTesting + SafeTestsets to the root test target and the nopre
sub-env; drop the now-unused Pkg test extra (the harness owns all Pkg ops).
Removed the stale committed test/nopre/Manifest.toml (regenerated at run time
by the harness's Pkg.develop + instantiate). test/test_groups.toml unchanged.

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 Canonicalize tests to @safetestset for module isolation Use SciMLTesting v1.2 (run_tests) Jun 14, 2026
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Rebuilt this branch as the SciMLTesting v1.2 conversion (reset to upstream/main, then rebuilt). Uses explicit-args run_tests because the Enzyme/Mooncake groups run only under All but are not declared in test_groups.toml, and the BigFloat/UnionAll testsets must run under both Core and nopre — neither is expressible in bare folder-discovery with test_groups.toml left unchanged. Verified locally on Julia 1.11: Core (48+7), nopre (7+7), All (48+7+65+13) all match master behavior.

@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 14, 2026 23:54
@ChrisRackauckas ChrisRackauckas merged commit afd0fe9 into SciML:main Jun 14, 2026
10 of 11 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