Skip to content

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

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)#63
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

Convert OrgMaintenanceScripts.jl to the SciMLTesting v1.2 folder model.

test/runtests.jl is now:

using SciMLTesting
run_tests()

Group membership is discovered from the test/ folder layout plus the
existing test/test_groups.toml (unchanged):

  • Core = top-level test/*.jl. The Core testsets that used to live inline
    in runtests.jl are extracted into a self-contained test/core_tests.jl;
    the seven existing Core files each gained their own using lines so they run
    under isolated @safetestset modules.
  • QA = test/qa/ (its sub-env Project.toml is retained). qa.jl was
    moved from the top level into test/qa/ so the Core glob does not pick it up.
  • multiprocess_testing_tests.jl was commented out of the old dispatcher, so it
    is parked under test/shared/ (not a group folder) — the exact set of tests
    run under each GROUP is unchanged.

Dep edits: added SciMLTesting + SafeTestsets to the root
[extras]/[targets].test and to test/qa/Project.toml (with [compat]).

Behavior-preserving: a folder-discovery dry-run confirms GROUP=Core/All fires
core_tests.jl + the seven Core files (and not the dormant multiprocess file),
and GROUP=QA fires qa.jl in the QA sub-env — matching the previous dispatch.

Supersedes the older v1.0.0 run_tests attempt and the separate
canonicalize-safetestset PR.

Ignore until reviewed by @ChrisRackauckas.

Convert the grouped-tests harness to the SciMLTesting v1.2 folder model.
runtests.jl is now `using SciMLTesting; run_tests()`; group membership is
discovered from the test/ folder layout + test_groups.toml.

Core = top-level test/*.jl. The inline Core testsets that previously lived in
runtests.jl (version bumping, project-file handling, repository processing,
legacy deprecations) are extracted into a self-contained test/core_tests.jl;
each existing Core file gains its own `using` lines so it runs under an
isolated @safetestset module.

QA = test/qa/ (qa.jl moved in from the top level so the Core glob does not pick
it up; keeps its sub-env Project.toml). multiprocess_testing_tests.jl was
commented out of the old dispatcher, so it moves to test/shared/ (not a group
folder) to preserve the exact per-GROUP test set.

Added SciMLTesting + SafeTestsets to the root [extras]/[targets].test and to
test/qa/Project.toml (with [compat]). 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 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 1ce1e1e into SciML:main Jun 14, 2026
7 of 10 checks passed
ChrisRackauckas added a commit that referenced this pull request Jun 21, 2026
…re (#67)

* Fix Core/Downgrade test failures: add `using Dates`, fix stdout capture

Two latent bugs surfaced after the SciMLTesting folder-based `run_tests`
migration (#63) isolated each test file in its own `@safetestset` module:

- `test/import_timing_analysis_tests.jl` and
  `test/invalidation_analysis_tests.jl` use `now()` / `DateTime(...)` but only
  did `using OrgMaintenanceScripts` / `using Test`. Under the per-file module
  isolation those `Dates` names are no longer in scope, so they threw
  `UndefVarError: now/DateTime not defined`, erroring the Core (julia 1, lts)
  and Downgrade jobs. Add `using Dates` to both test files.

- The import-timing subprocess script redirected stdout into an `IOBuffer`,
  which `redirect_stdout` does not support (`MethodError: no method matching
  (::Base.RedirectStdStream)(::IOBuffer)` on both 1.10 and 1.12). Capture into
  a temp file (an IOStream is supported) and read it back, so the timing
  analysis actually works instead of always falling into the error branch.

Verified locally with `Pkg.test()` GROUP=Core on Julia 1.10 (lts) and 1.12
("1"): all eight Core test files pass (import_timing 56/56, invalidation
36/36), "Testing OrgMaintenanceScripts tests passed", exit 0.

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

* Raise JSON3 compat floor to 1.1 for Downgrade green

The Downgrade job resolves JSON3 to v1.0.0, where `JSON3.pretty` does not
exist (`UndefVarError: pretty not defined`). `write_import_timing_report`
calls `JSON3.pretty`, so both its testset and `analyze_repo_import_timing`
(which calls it) errored on Downgrade while passing on Core (newer JSON3).

`JSON3.pretty` was introduced in JSON3 v1.1.0 (src/pretty.jl). Raising the
compat floor from "1" to "1.1" makes the minimum resolved version one that
has the function, fixing Downgrade without capping the upper bound (still
allows the current v1.14.x).

Verified locally on Julia 1.10 with JSON3 pinned to the floor v1.1.0:
import_timing_analysis_tests.jl passes 56/56, exit 0, zero errors.
Reproduced the original failure on v1.0.0 (UndefVarError) beforehand.

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

---------

Co-authored-by: ChrisRackauckas-Claude <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