Tests are organized by long-lived product responsibility rather than by development phase, version number, or historical task.
core/: Mat semantics, basic operators, types, runtime behavior, internal dispatch, and the selected upstream compatibility subset.imgproc/: color, filtering, geometry, intensity, morphology, and other image-processing contracts.pipeline/: ordered preprocessing plans, descriptor inference, prepared execution, workspace behavior, and hard fusion requirements.imgcodecs/: image read/write behavior and failure paths.highgui/: the optional header-only window API, input constraints, and lifecycle behavior.smoke/: independent header compilation, ODR, target configuration, and minimal pipelines.opencv_contract/: optional isolated differential tests against OpenCV.upstream/: extracted OpenCV test snapshots and status manifests; snapshots are not compiled directly.support/: shared Core/Imgproc test-state guards.utils/: cross-module helpers, currently including the shared NPY Mat loader inmat_load.*.
Public-contract tests verify public API results, boundaries, and exceptions.
Tests that force scalar/UI paths or inspect dispatch belong in the owning
module's internal/ directory. Ported upstream cases belong in upstream/
and retain their original suite/case association.
cmake -S . -B build-tests \
-DCVH_BUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build build-tests --target cvh_test_core cvh_test_imgproc --parallel 2
ctest --test-dir build-tests --output-on-failureThe canonical module-level GTest targets are cvh_test_core,
cvh_test_imgproc, cvh_test_pipeline, cvh_test_imgcodecs, and
cvh_test_highgui.
cvh_test_gemm_isa uses cvh::headers to validate specialized GEMM ISA paths
without mixing architecture-conditional skips into the default Core baseline.
test/core/sources.cmake, test/imgproc/sources.cmake, and
test/pipeline/sources.cmake list sources explicitly; configure-time checks
reject missing, duplicate, or unregistered *_test.cpp files.
The complete release gate uses the optimized header-only configuration:
./scripts/ci_headers_all.shThis command fixes CVH_ENABLE_OPTIMIZATION=ON. Core and Imgproc scalar,
OpenCV UI, NEON, and AVX2 paths remain header-only. The gate builds the default
all target and runs the complete CTest inventory. Core/Imgproc XML results,
CTest inventory, and executed/failed/skipped counts are validated against
test/ci/header_gate_expectations.json.
The scalar-only configuration remains available for local diagnostics and is not a hosted CI gate.
test/ci/header_gate_expectations.jsonowns expected Core and Imgproc test counts and architecture-specific skip expectations.test/upstream/opencv/core/channel_manifest.jsonandtest/upstream/opencv/imgproc/case_manifest.jsonown upstream case status, provenance, and local consumers.- Current failures remain executable failures reported by CTest/GTest. The repository does not maintain a handwritten failure-count ledger.
- Product-boundary cases use
OUT_OF_SCOPEwith an explicit reassessment condition; they are not registered as permanent skips.
- File names describe stable API or algorithm responsibility, not phases, versions, or task numbers.
- Every test has an observable assertion; print-only calls, empty calls, and permanent skips are not valid tests.
- Failure cases spanning multiple APIs are split so the owning component is immediately visible.
- Public tests do not use production
detailhelpers as their oracle. - Every fixture has a deterministic generator, hash, oracle, and consumer.
- Test status, consumer paths, and the owning machine-readable manifest are updated together.