Skip to content

Test cleanup - #297

Merged
filoferra merged 5 commits into
JuliaParallel:mainfrom
filoferra:test-cleanup
Sep 28, 2026
Merged

filoferra merged 5 commits into
JuliaParallel:mainfrom
filoferra:test-cleanup

Conversation

@filoferra

Copy link
Copy Markdown
Collaborator

Reorganises test/ without changing what the library does. Each commit is a step you can review on its own.

1. Tests the suite had stopped running. The four files testing the manual's examples are listed in runtests.jl again. Their stale skips are now real tests: IS set operations, and ASCII and binary viewer I/O. The Tao examples run in a fresh process. In PETSc 3.25 the LMVM-based Tao types fail after any earlier cycle that created a KSP, and docs/src/man/tao_lowlevel.md now says so. 01-hello.jl is removed, and the SNES helper test runs once instead of twice.

2. One folder per group. test/ is split into core, vecmat, solvers, dm, lowlevel, regression, examples and mpi, and the file-name prefixes are gone. Pkg.test("PETSc"; test_args = ["dm", "mpi"]) runs only the named groups, and an unknown name raises an error. Paths go through pkgdir(PETSc). scripts/generate_renames.jl now writes test/core/deprecations.jl, and docs/src/man/contributing.md has a "Running the tests" section.

3. Less duplication.

  • The two DMStag files stay separate: dm/dmstag.jl runs on any number of ranks, and dm/dmstag_serial.jl checks exact values on one rank. Each file now says which it is at the top, and their testset names no longer clash.
  • solvers/snes_callbacks.jl and the SNES half of core/smoke.jl solved the same 2×2 system and still taught the return 0 callback rule. That system is now tested once, in solvers/snes.jl, with callbacks that return nothing, in both the named-function and do-block forms.
  • The @assert-only snes_helpers.jl and tao_helpers.jl become lowlevel/readers.jl, which uses @test.
  • 19 files used getlib(PetscScalar = Float64), which assumed an Int64 build. They now take the loaded library from PETSc.petsclibs[1].

… = [...])

The 62 test files move into core, vecmat, solvers, dm, lowlevel, regression, examples and mpi, without the test_/low_level_/mpi_/ doc_examples_ prefixes; no test changes beyond paths. runtests.jl runs the groups in order, and test_args selects some of them. The deprecation tests are generated into test/core/deprecations.jl. The contributing page says how to run one group.
getlib(PetscScalar = Float64) assumed an Int64 build; the tests now use whichever library is loaded.
@filoferra
filoferra merged commit 84576c0 into JuliaParallel:main Sep 28, 2026
5 checks passed
@filoferra
filoferra deleted the test-cleanup branch September 28, 2026 16:16
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.

1 participant