Skip to content

Use SciMLTesting v1.2 (run_tests) - #129

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

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:sciml-testing-rollout

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

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

  • Core is an explicit thunk that includes core_tests.jl into Main, not an isolated @safetestset module. core_tests.jl's serialization test deserializes a RuntimeGeneratedFunction produced by a separate process whose module tag is Main.#_RGF_ModTag; the body must therefore run where RuntimeGeneratedFunctions.init initializes Main. Folder-discovery's @safetestset isolation runs init on a submodule, breaking the deserialize (verified: UndefVarError: #_RGF_ModTag not defined in Main), so Core uses the v1.2 explicit-args thunk path.
  • QA = test/qa/ (qa.jl) run in the existing isolated test/qa/Project.toml sub-env via run_tests's qa = (; env = ..., body = ...).
  • The subprocess helper serialize_rgf.jl is moved to test/shared/ (a non-group folder) so it is not discovered as a Core test file; core_tests.jl now references it by absolute path.
  • core_tests.jl gains the using statements the old runtests.jl provided (Test, RuntimeGeneratedFunctions, BenchmarkTools, Serialization). precomp/ is untouched.
  • Added SciMLTesting + SafeTestsets to the test target and SciMLTesting to test/qa/Project.toml; dropped Pkg (the harness owns all Pkg operations; no test file uses Pkg). test/test_groups.toml unchanged.

Behavior-preserving: the file set run under GROUP=Core and GROUP=QA is unchanged. Verified locally on Julia 1.11 — GROUP=Core passes (including the cross-process serialization round-trip) and GROUP=QA passes (Aqua, 10/10).

Supersedes the v1.0.0 harness conversion previously on this branch.

Ignore until reviewed by @ChrisRackauckas.

Convert test/runtests.jl to SciMLTesting v1.2. Core is an explicit thunk that
includes core_tests.jl into Main (NOT an isolated @safetestset module): the
serialization round-trip test deserializes RuntimeGeneratedFunctions whose
module tag is Main.#_RGF_ModTag, so the body must run where
RuntimeGeneratedFunctions.init initializes Main — folder-discovery's
@safetestset isolation cannot express this. QA uses the standard test/qa/
sub-env. The subprocess helper serialize_rgf.jl is moved to test/shared/ (a
non-group folder) so it is not mistaken for a Core test file, and core_tests.jl
references it by absolute path. core_tests.jl gains the using statements the
old runtests.jl provided (Test, RuntimeGeneratedFunctions, BenchmarkTools,
Serialization). precomp/ is untouched.

Added SciMLTesting + SafeTestsets to the test target and SciMLTesting to
test/qa/Project.toml; dropped Pkg (the harness owns all Pkg ops; no test file
uses Pkg). test_groups.toml unchanged.

Verified locally on Julia 1.11: GROUP=Core and GROUP=QA both 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 (run_tests) Jun 14, 2026
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review June 14, 2026 23:54
@ChrisRackauckas
ChrisRackauckas merged commit a8b2cbf into SciML:master Jun 14, 2026
15 of 17 checks passed
ChrisRackauckas added a commit that referenced this pull request Jun 15, 2026
The QA group's test/qa/Project.toml declared the in-repo package source as
`path = ".."`, which resolves relative to the env directory test/qa to
test/ — a directory with no Project.toml. With SciMLTesting v1.2's
run_tests (PR #129), activate_group_env now walks the [sources] graph via
develop_sources! (the Julia 1.10 [sources] backport) and Pkg.develop's each
path, so it errors:

    could not find project file (Project.toml or JuliaProject.toml) in
    package at `.../test/` maybe `subdir` needs to be specified

The env directory test/qa is two levels below the repo root, so the source
path must be ../.. (matching every other converted SciML repo, e.g.
SciMLOperators/SciMLStructures). This made both the QA and Core grouped-test
jobs fail on the LTS (Julia 1.10) where the [sources] backport is active.

Verified locally on Julia 1.10: GROUP=QA now passes (QA 10/10) and
GROUP=Core passes; before the fix GROUP=QA reproduced the CI error exactly.

Co-authored-by: Chris Rackauckas - Beep Boop Edition <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