Skip to content

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

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:sciml-testing-rollout
Draft

Use SciMLTesting v1.2 (folder-based run_tests)#1044
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:sciml-testing-rollout

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Converts the test suite to the SciMLTesting v1.2 model.

LinearSolve's root test harness has platform/version guards (Base.Sys.islinux(), VERSION >= v"1.12", prerelease checks), a curated All group (Core + LinearSolveSTRUMPACK only), an umbrella alias (LinearSolveCUDA -> GPU), and lib/* sublibrary dispatch via LINEARSOLVE_TEST_GROUP. Folder-discovery mode cannot express these, so this uses SciMLTesting v1.2 explicit-args run_tests over group-named folders (the OrdinaryDiffEq-style monorepo shape).

Changes:

  • test/runtests.jl: keeps the sublibrary pre-step (transitive [sources] develop walk on Julia <1.11 + withenv(LINEARSOLVE_TEST_GROUP) Pkg.test(sublib)) verbatim; replaces the root if GROUP == ... ladder with run_tests(; core, groups, qa, all=["Core","LinearSolveSTRUMPACK"], umbrellas=Dict("LinearSolveCUDA"=>["GPU"]), sublib_env="LINEARSOLVE_TEST_GROUP", lib_dir=...). Platform/version-guarded groups use thunks that gate activate_group_env inside the guard (so the env is not instantiated on a platform/version where the group does not run, matching the old dispatch); unguarded dep-adding groups (GPU/Pardiso/HSL) use env= specs.
  • Test folders renamed to their group-name casing (e.g. test/core -> test/Core, test/strumpack -> test/LinearSolveSTRUMPACK, test/nopre -> test/NoPre, ...); test/pureumfpack.jl moved into test/LinearSolvePureUMFPACK/. test/qa kept lowercase. Per-group [sources] paths are depth-preserved.
  • Added SciMLTesting (+ compat 1) to the root test target and to every @safetestset-running sub-env Project.toml; added SafeTestsets to those sub-envs that lacked it (their @safetestset bodies do using Test, SafeTestsets in the activated env). Pkg is retained in the root test deps (the sublibrary pre-step still uses it).
  • test/test_groups.toml unchanged.

Behavior preservation was verified by driving the real SciMLTesting v1.2.0 run_tests over every GROUP value on Julia 1.11 and 1.12: the fired group bodies, sub-env activations, and lib/* sublibrary routing (including <sublib>, <sublib>_QA, <sublib>_Core) match the old dispatcher exactly, including the Enzyme/ParU/Trim version guards and the linux/non-windows platform guards.

Ignore until reviewed by @ChrisRackauckas.

Restructure test/ into group-named folders and replace the hand-written GROUP
dispatch ladder in test/runtests.jl with SciMLTesting v1.2 run_tests in
explicit-args mode. The sublibrary pre-step (LINEARSOLVE_TEST_GROUP routing to
lib/*) is preserved verbatim; the root group dispatch (curated All =
Core + LinearSolveSTRUMPACK, umbrella LinearSolveCUDA -> GPU, and all
platform/version guards) is expressed via run_tests core/groups/qa/all/umbrellas.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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