Add CTest functional and performance tests - #2
Conversation
Add a CTest-driven test suite: a functional correctness test that runs without DSA hardware, and an A/B performance regression test that compares the current dto.c against a baseline object built from the baseline branch. See TESTING.md for usage. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e395074f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| DEPENDS ${CMAKE_SOURCE_DIR}/tests/build_baseline.sh | ||
| COMMENT "Building dto_baseline.o from baseline branch" |
There was a problem hiding this comment.
Keep perf target from using a stale baseline
Because this output rule only depends on build_baseline.sh, CMake will not invoke the script again after perf_baseline/dto_baseline.o already exists unless that local dependency changes. The SHA check inside the script therefore does not run on normal incremental builds, so if github.com/intel/DTO advances perf_baseline, the perf test silently keeps comparing against the old cached object and can report misleading regressions or passes until the build tree is cleaned.
Useful? React with 👍 / 👎.
| target_link_libraries(dto-test-wodto PRIVATE pthread) | ||
|
|
||
| # ---- Test Suite ---- | ||
| option(DTO_BUILD_TESTS "Build the DTO test suite" ON) |
There was a problem hiding this comment.
Make networked perf tests opt-in
With DTO_BUILD_TESTS defaulting to ON and the accel-config/NUMA options also enabled by default, a normal cmake --build includes dto-test-perf; that target runs build_baseline.sh, which fetches https://github.com/intel/DTO.git and exits with failure when no cached baseline exists. In offline or restricted CI environments this makes even building the library or the functional tests fail unless users know to disable tests/features, so the network-dependent perf target should be behind an explicit opt-in.
Useful? React with 👍 / 👎.
|
Superseded by intel#32 — recreated in intel/DTO so the whole stack targets intel:main directly. |
Stack 3/3 — stacked on
cmake-numa-accel(#1).Adds a CTest-driven test suite:
dto.cagainst a baseline object built from the baseline branchSee
TESTING.mdfor usage.Stack