Skip to content

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

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

Use SciMLTesting v1.2 (folder-based run_tests)#521
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:canonicalize-safetestset

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Contributor

Converts the test suite to the SciMLTesting v1.2 folder-discovery model.

test/runtests.jl is now just:

using SciMLTesting
run_tests()

Layout:

  • Core = top-level test/*.jl @safetestset wrappers. Each wrapper includes its self-contained body from test/bodies/, which in turn includes the shared preamble test/shared/test_setup.jl (the long using StructuralIdentifiability: ... import block + the random_ps/random_ps_matrix/rand_poly helpers + const GROUP). A new test/benchmarks_valid.jl Core wrapper reproduces the master "Benchmarks are valid" testset (it includes the package's benchmarking/benchmarks.jl).
  • ModelingToolkitSIExt = test/ModelingToolkitSIExt/ with its own sub-env Project.toml declaring the extension trigger weakdeps (ModelingToolkitBase, SymbolicUtils, Symbolics) plus Nemo/SpecialFunctions/TestSetExtensions. This replaces the dynamic Pkg.add("ModelingToolkit")/Pkg.add("Symbolics") the old runtests.jl did for this group; the sub-env reliably triggers the ModelingToolkitSIExt extension where eval_at_nemo lives.
  • QA = test/qa/qa.jl, run in the main test env (Aqua stays in the root [extras], exactly as on master — no QA sub-env is invented).
  • test/shared/ and test/bodies/ are non-group folders, never auto-discovered.

The exact set of tests run under each GROUP value is unchanged from master:

  • Core runs the 44 non-QA top-level test files (verified identical set) plus the benchmarks testset.
  • QA runs qa.jl only.
  • All runs Core plus the ModelingToolkit extension test.
  • ModelingToolkitSIExt runs the extension test.

SciMLTesting (+ SafeTestsets) added to the root test deps and the ext sub-env; Pkg dropped from the root test deps (the harness owns all Pkg operations now). test/test_groups.toml is unchanged.

This supersedes the prior @safetestset canonicalization on this branch (which is the foundation reused here).

Ignore until reviewed by @ChrisRackauckas.

Replace the hand-written GROUP dispatch in test/runtests.jl with the
SciMLTesting v1.2 folder-discovery entry point (`using SciMLTesting;
run_tests()`), restructuring the suite into group folders:

  * Core = top-level test/*.jl @safetestset wrappers (each includes its
    self-contained body from test/bodies/, which in turn includes the
    shared preamble test/shared/test_setup.jl). benchmarks_valid.jl is a
    new Core wrapper reproducing the master "Benchmarks are valid" testset
    (it includes the package's benchmarking/benchmarks.jl).
  * ModelingToolkitSIExt = test/ModelingToolkitSIExt/ with its own sub-env
    Project.toml declaring the extension trigger weakdeps
    (ModelingToolkitBase, SymbolicUtils, Symbolics) plus Nemo/
    SpecialFunctions/TestSetExtensions, replacing the dynamic
    Pkg.add("ModelingToolkit") the old runtests did for this group.
  * QA = test/qa/qa.jl, run in the main test env (Aqua stays in root
    [extras], as on master — no qa sub-env is invented).
  * test/shared/test_setup.jl and test/bodies/ are non-group folders, never
    auto-discovered.

The exact set of tests run under each GROUP value (All, Core, QA,
ModelingToolkitSIExt) is unchanged from master: Core runs the 44 non-QA
top-level test files plus the benchmarks testset; QA runs qa.jl; All adds
the ModelingToolkit extension test; ModelingToolkitSIExt runs that test.

Add SciMLTesting (+ SafeTestsets) to the root test deps and the ext
sub-env; drop Pkg from the root test deps (the harness owns all Pkg
operations now). test/test_groups.toml is 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 test suite to @safetestset for per-unit module isolation 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 ac3c5a6 into SciML:master Jun 14, 2026
13 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