diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f6245fd..ea04a6ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -462,10 +462,17 @@ jobs: - name: Run CODES tests working-directory: codes - # The `full-ci` test preset excludes the union-surrogate director tests: - # their *.sh harnesses set only ~8 of the ~20 config-template vars - # (DIRECTOR_* etc.) so these tests fail. - run: ctest --preset full-ci + # The union-surrogate tests (LABELS "nightly" in tests/CMakeLists.txt) run + # a heavy MILC+Jacobi UNION workload -- ~30 min for the set -- so PR/push + # skips them and the scheduled nightly build runs the full set including + # them. (Their director-free config fix means they no longer segfault on an + # empty dir-nw-lp; see tests/conf/union-milc-jacobi-workload/.) + run: | + if [ "${{ github.event_name }}" = "schedule" ]; then + ctest --preset full-ci + else + ctest --preset full-ci --label-exclude nightly + fi - name: Upload logs on failure if: failure() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ec0acdeb..70ab98e5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,182 @@ enable_testing() configure_file(run-test.sh.in run-test.sh) +# codes_add_equivalence_test — register an equivalence/determinism test. +# +# Runs a model binary two or more times and asserts a marker line (default +# "Net Events Processed") is identical across runs. Replaces the copy-and-edit +# per-scenario shell scripts: adding a test is one call here, no new file. +# +# codes_add_equivalence_test( +# NAME +# BINARY # e.g. tutorial-synthetic-ping-pong +# CONFIG +# [NP ] # default 3 +# [ARGS ] +# [REPEAT ] # default 2; identical runs (reproducibility) +# [VARIANTS "" "" ...] # one run each, appended +# [MARKER ] # default "Net Events Processed" +# [SETUP