Skip to content

Add post-build CTest validation tests#27

Open
gapost wants to merge 5 commits into
mainfrom
ctest
Open

Add post-build CTest validation tests#27
gapost wants to merge 5 commits into
mainfrom
ctest

Conversation

@gapost
Copy link
Copy Markdown
Member

@gapost gapost commented May 14, 2026

Summary

  • Adds optional post-build CTest suite (-DOPENTRIM_POST_BUILD_TESTS=ON)
  • Two tests per case using a fixture: run opentrim, then compare output with h5diff
  • 3 input files × 2 thread counts (1 and 2), 18 tests total
  • Comparison uses --relative=1e-9 on /tally physics datasets and --relative=1e-6 on the respective error (_sem) datasets

OBS integration notes

  • Add -DOPENTRIM_POST_BUILD_TESTS=ON to the cmake invocation in %build
  • Add a %check section: ctest --output-on-failure
  • Add hdf5-tools to BuildRequires (provides h5diff)

Test plan

  • Configure with -DOPENTRIM_POST_BUILD_TESTS=ON
  • Run ctest -R PostBuild --output-on-failure and confirm all 18 tests pass
  • Verify template files (out{N}j{J}.h5) are present in test/post-build/

gapost added 2 commits May 14, 2026 02:32
- in folder test/post-build
- There are 3 input json files (in1,in2,in3)
- They produce 3 h5 out files (out1,out2,out3)
- h5diff is used for comparing
- number of threads must be fixed otherwise the results are not reproducible
@gapost gapost requested a review from psaxioti May 14, 2026 21:19
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