PICurv testing is intentionally layered: Python control-plane validation, PETSc installation checks, focused C unit suites, executable smoke runs, MPI variants, and coverage gates. Choose the narrowest layer that answers your current question.
Function-level docs in tests/c/ are part of the repository contract. For new or touched C tests/helpers, keep the Doxygen blocks concise but descriptive: the @brief should state what the routine verifies or sets up, not just that it is a test-local routine.
make test-python (make test alias)make coverage-pythonmake coverage-cmake coveragemake doctor (make install-check alias)make unitmake unit-geometrymake unit-setupmake unit-solvermake unit-particlesmake unit-iomake unit-loggingmake unit-postmake unit-post-compute-mpimake unit-post-eulerian-vtk-mpimake unit-post-particle-vtk-mpimake unit-gridmake unit-metricmake unit-boundariesmake unit-poisson-rhsmake unit-runtimemake unit-simulationmake unit-mpimake unit-periodicmake unit-periodic-devmake unit-newton-krylovmake unit-momentum-candidatesmake unit-momentum-newton-boundary-fixedpointmake unit-statisticsmake unit-statistics-targetmake unit-statistics-windowmake unit-statistics-accumulatormake unit-statistics-configmake smokemake smoke-mpimake smoke-mpi-matrixmake smoke-stressmake smoke-periodicmake smoke-periodic-devmake smoke-driven-periodicmake audit-agent-setupmake audit-ingressmake audit-docs-expansionmake certify-docs-fastmake certify-docsmake checkmake check-mpimake check-mpi-matrixmake check-fullmake check-stresstest_cli_smoke.pysubmit, cancel, and sweepsummarize JSON/text output, time-history discovery/plot orchestration, standalone plot.gen, and failure pathspicurvtest_case_maintenance.pyinit origin metadata behaviorbuild, sync-config, status-source, and pull-sourceoverwrite, prune)status-source)test_config_regressions.pytest_repo_consistency.pypicurv validatetest_review_packet.pytest_storage.pypost and submit refuse before missing data is misdiagnosedtest_run_directory_containment.pytest_c_guard_behaviour.pytest_repo_file_enumeration.pytest_post_spectra_config.pytest_spectra_shell_spectrum.pytest_spectral_random_velocity.pytest_driven_periodic_profile_tools.pyexamples/periodic_test/*/tools/ on a synthetic checkpoint bundle: covariance assembly, wall fold and shear-stress sign, the duct's eight-image symmetry fold, and u_tau from the wall model or body forcetest_profile_field_slice.pytest_picgrid.pytest_grid_generator.pyorigin placement, and the ordered placement/similarity transform listbox piecewise wall-height fields: segment continuity, a step moving only its own wall, a hill closing on itself, and the spanwise envelope giving an obstacle finite widthsweep cross-sections and centrelines: a straight rectangular sweep is a box, the disc map fills the circle with no hole, and swept grids are right-handedlength_reftest_capability_tooling.pytest_units_and_scaling.pytests/tooling/audit_units.py) passes against page 19's indexesdt, grid lengths, BC velocities and fluxes, the point source, window times, spectral provider parameters, ic_gen expressions, and a file initial condition staged from physical units or from another run's scalestest_expression_language.pygenerators/ic.gen reproduces every case of tests/fixtures/expression_conformance.txt, which make unit-particles also evaluates through the C runtime evaluatorparamstest_particle_fields.pymodels.physics.particles.fields: the settable set matches the C catalog's USER_INITIALIZE capability, values become quoted -particle_fields_* options, and validation refuses unknown fields, bad expressions, particle-free runs, and a conflicting verification scalar sourcetest_field_catalog.pytest_subsystem_lifecycle.pytest_freshness.pytest_inline_choices.pychoices lists are detectedtest_path_notation.pytest_family_census_classifications.pytest_documentation_counts.pytest_install_check.c: PETSc environment and basic object viability (doctor: environment-visible, basic-petsc-objects)test_geometry.c: interpolation and geometric signed-distance helperstest_setup_lifecycle.c: setup/cleanup lifecycle, RNG, and initialized particle-settlement contracts; configured particle initial values reaching every particle, the t=0 cell mean, and the scatter's filled Psi dummy cells; IEM relaxing each particle toward its own cell mean; post-processing loading saved particle averagestest_solver_kernels.c: analytical geometry/particle dispatch, LES filter/eddy-viscosity, FlowSolver guardrails, and analytical source helperstest_particle_kernels.c: walking-search helper kernels, and the initial-value expression engine (shared conformance cases, refusals, keyed draws)test_io.c: I/O path checks, parser helpers, scaling-ingestion contracts, and startup-banner summary contractstest_logging.c: log-level, allow-list, string-conversion, continuity/min-max/interpolation diagnostics, profiling, and snapshot-cadence contractstest_postprocessing.c: post-processing kernel contracts (specific-KE, displacement, nodal average, normalization, dimensionalization, Q-criterion)test_vtk_io.c: VTK writer and data-preparation contracts (coordinates, field gather/subsampling, particle prep)test_postprocessor.c: postprocessing orchestration contracts (swarm setup, pipeline dispatch, eulerian/particle output, statistics dispatch)test_post_compute_mpi.c: analytic serial/MPI checks for Eulerian, particle, resizing, and derived field-statistics computetest_post_eulerian_vtk_mpi.c: exhaustive serial/MPI Eulerian VTK value and byte-equivalence checkstest_post_particle_vtk_mpi.c: exhaustive serial/MPI particle VTK value and byte-equivalence checkstest_statistics.c: particle statistics kernel contracts (MSD CSV output and empty-swarm behavior)test_statistics_moments.c: weighted centered moment, co-moment, and parallel-merge kernelstest_statistics_window.c: window scheduling, weighting, clipping, and identity hashingtest_statistics_accumulator.c: per-window storage, accumulation, masks, and derived quantitiestest_statistics_target.c: spatial target plan across cell, node, face, and periodic layoutstest_statistics_config.c: field-statistics control resolution from the generated control filetest_grid.c: local/global bounding-box helperstest_metric.c: metric inversion, contravariant velocity, face geometry helpers, and the degeneracy check on a wall-resolved-sized celltest_boundaries.c: boundary factory, direct handler-behavior checks, wall-model dispatch across the log law, Werner-Wengle, and Cabot, and each cell field's dummy-cell rule (UpdateDummyCells, UpdateCornerNodes)test_les.c: LES closure kernels - symmetric-tensor algebra, strain rate, filter widths (including the Scotti closed form and independence from cell orientation), the Germano model tensor and Leonard stress, coefficient clipping and the viscosity floor, homogeneous-direction resolution, the WALE and Vreman kernels against independent evaluations, and cell edge vectors recovered from metricstest_periodic_dev.c: gating geometric-periodic boundary and synchronization harnesstest_poisson_rhs.c: pressure update, RHS, projection, body-force and diffusivity helpers, and the Clark gradient term's scaling and coefficient on non-unit cellstest_runtime_kernels.c: setup/runloop/particle/interpolation/scatter/wall/walltime-guard/LES helper contractstest_mpi_kernels.c: multi-rank particle distribution, bbox collectives, and restart migration behaviortest_momentum_newton_krylov.c: matrix-free Newton-Krylov momentum callbacks and helper contractstest_momentum_convective_candidates.c: finite-difference Jacobian study of the production convection-only residualtest_momentum_newton_boundary_fixedpoint.c: opt-in regression for the Newton-Krylov Cartesian-seed correction on a production-sized straight ducttest_support.ctest_support.hda/fda/swarm contract (da = IM+1/JM+1/KM+1, coordinate-DM fda, production swarm fields)Single-rank smoke (make smoke) verifies:
-help launch viability (simulator, postprocessor)62 (PETSC_ERR_ARG_WRONG) and still satisfy the smoke contractpicurv init self-contained case creation and metadatainit + validate + dry-run checks (flat_channel, bent_channel, brownian_motion)malloc_debug, malloc_dump, malloc_view, and log_viewload, init)Opt-in stress smoke (make smoke-stress) additionally verifies:
Geometric-periodic smoke (make smoke-periodic) is part of the standard check gate:
Multi-rank smoke (make smoke-mpi, make smoke-mpi-matrix) additionally verifies:
Useful env knobs:
TEST_MPI_NPROCS for unit-mpiSMOKE_MPI_NPROCS for smoke-mpiSMOKE_MPI_MATRIX_NPROCS for smoke-mpi-matrixKEEP_SMOKE_TMP=1 to preserve smoke temp workspace for debuggingpicurv_cli/ or YAML contracts:make test-pythonmake sync-agent-skillsmake audit-agent-setupmake unit-<area>make unit-setupmake smokemake unit-simulationmake unit-periodicmake smoke-periodicmake smoke plus MPI variant if rank behavior is involvedmake smoke-stressmake check (or make check-mpi)make check-fullmake coverageLocateParticleOrFindMigrationTarget boundary-clamp, ghost-handoff, tie-breaker, LOST, and MIGRATING_OUT branchesGuessParticleOwnerWithBBox heuristicMomentumSolver_Explicit_RungeKutta4MomentumSolver_DualTime_Picard_JamesonRKAssemblePoissonOperator/ProjectVelocity; periodic branches are exercised end to end only2026-03-20 audit snapshot: src/AnalyticalSolutions.c (23.93%) and src/BodyForces.c (11.69%) still need direct unit harnessessrc/les.c was rewritten after the 2026-03-20 snapshot, so that figure no longer describes the file; test_les.c covers the kernels directly, and the assembled model path has not been re-measured2026-03-20 audit snapshot: src/poisson.c (45.66%) and src/rhs.c (61.95%) still need deeper direct branch coverage2026-03-20 audit snapshot: src/runloop.c (64.76%) still needs more runtime-orchestration branch coverage2026-03-20 audit snapshot: src/Boundaries.c (68.10%) still needs additional non-periodic boundary edge-case coveragepython tests/tooling/audit_function_docs.py, then pytest -q, then markdown link checks.doctor, unit-*, smoke*, check*, and coverage-c require PETSc/MPI tooling.check-full is the single-command comprehensive gate (check + unit-mpi + smoke-mpi + smoke-mpi-matrix).check-stress extends check-full with the opt-in smoke-stress layer.install-check, ctest-*) still exist, but canonical names are preferred in docs and CI.