From 21f71aaa9041fa23d72502eb00ef0a054e736868 Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Fri, 5 Jun 2026 19:25:46 +0530 Subject: [PATCH 1/5] Parallelize PR system tests via GitHub Actions matrix. Add release_test_shard_1/2 covering the same cases as release_test, and run them as separate matrix jobs for clearer logs and cheaper reruns. --- .github/workflows/system-tests-pr.yml | 12 ++++- tools/tests/README.md | 6 +++ tools/tests/tests.yaml | 55 +++++++++++++++++++++ tools/tests/validate_release_test_shards.py | 51 +++++++++++++++++++ 4 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 tools/tests/validate_release_test_shards.py diff --git a/.github/workflows/system-tests-pr.yml b/.github/workflows/system-tests-pr.yml index f59b6fc70..69ef2c340 100644 --- a/.github/workflows/system-tests-pr.yml +++ b/.github/workflows/system-tests-pr.yml @@ -145,12 +145,20 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" run-system-tests: - name: Trigger system tests + name: Trigger system tests (shard ${{ matrix.shard }}) if: ${{ github.event.label.name == 'trigger-system-tests' }} needs: gather-refs + strategy: + fail-fast: false + matrix: + include: + - shard: 1 + suites: release_test_shard_1 + - shard: 2 + suites: release_test_shard_2 uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop with: - suites: release_test + suites: ${{ matrix.suites }} build_args: "PLATFORM:ubuntu_2404,\ PRECICE_REF:${{ needs.gather-refs.outputs.ref-precice }},\ PYTHON_BINDINGS_REF:${{ needs.gather-refs.outputs.ref-python-bindings }},\ diff --git a/tools/tests/README.md b/tools/tests/README.md index 83a71910a..658486ae9 100644 --- a/tools/tests/README.md +++ b/tools/tests/README.md @@ -54,6 +54,12 @@ To be able to fill in the right case tuple into the `tests.yaml`, you can use th ## Running the system tests on GitHub Actions +Pull-request system tests run as a GitHub Actions matrix over `release_test_shard_1` and +`release_test_shard_2` (together they cover the same cases as `release_test`). When a shard +fails, re-run only the failed matrix job. With multiple `precice-tests-vm` runners, shards +may execute concurrently; overlapping Docker image builds are possible and acceptable unless +CI reports failures. + Go to Actions > [Run Testsuite (manual)](https://github.com/precice/tutorials/actions/workflows/run_testsuite_manual.yml) to see this workflow. After bringing these changes to `master`, the manual triggering option should be visible on the top right. Until that happens, we can only trigger this workflow manually from the [GitHub CLI](https://github.blog/changelog/2021-04-15-github-cli-1-9-enables-you-to-work-with-github-actions-from-your-terminal/): diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index 1a497d904..cb7f5d1d6 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -551,6 +551,61 @@ test_suites: - *water-hammer_fluid1d-left-nutils_fluid3d-right-openfoam - *wolf-sheep-soil-creep_soil-creep-landlab_wolf-sheep-grass-mesa + # Shards of release_test for parallel CI (union = release_test, no duplicates). + release_test_shard_1: + tutorials: + - *breaking-dam-2d_fluid-openfoam_solid-calculix + - *channel-transport_fluid-openfoam_transport-nutils + - *channel-transport-reaction_fluid-fenics_chemical-fenics + - *elastic-tube-1d_fluid-cpp_solid-cpp + - *elastic-tube-1d_fluid-cpp_solid-python + - *elastic-tube-1d_fluid-fortran_solid-fortran + - *elastic-tube-1d_fluid-fortran-module_solid-fortran-module + - *elastic-tube-1d_fluid-python_solid-python + - *elastic-tube-3d_fluid-openfoam_solid-calculix + - *flow-around-controlled-moving-cylinder_controller-fmi_fluid-openfoam_solid-python + - *flow-over-heated-plate_fluid-openfoam_solid-fenics + - *flow-over-heated-plate_fluid-openfoam_solid-nutils + - *flow-over-heated-plate_fluid-openfoam_solid-openfoam + - *flow-over-heated-plate_fluid-su2_solid-openfoam + - *flow-over-heated-plate-nearest-projection_fluid-openfoam_solid-openfoam + - *flow-over-heated-plate-partitioned-flow_fluid1-openfoam_fluid2-openfoam_solid-openfoam + - *flow-over-heated-plate-two-meshes_fluid-openfoam_solid-calculix + - *free-flow-over-porous-media_free-flow-dumux_porous-media-dumux + - *heat-exchanger_fluid-inner-openfoam_solid-calculix_fluid-outer-openfoam + - *heat-exchanger-simplified_fluid-top-openfoam_fluid-bottom-openfoam_solid-calculix + - *multiple-perpendicular-flaps_fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii + - *oscillator_mass-left-fmi_mass-right-fmi + - *oscillator_mass-left-python_mass-right-python + - *oscillator-overlap_mass-left-python_mass-right-python + + release_test_shard_2: + tutorials: + - *partitioned-backwards-facing-step_fluid1-openfoam_fluid2-openfoam + - *partitioned-elastic-beam_dirichlet-calculix_neumann-calculix + - *partitioned-heat-conduction_dirichlet-fenics_neumann-fenics + - *partitioned-heat-conduction_dirichlet-openfoam_neumann-openfoam + - *partitioned-heat-conduction-complex_dirichlet-fenics_neumann-fenics + - *partitioned-heat-conduction-direct_dirichlet-nutils_neumann-nutils + - *partitioned-heat-conduction-overlap_left-fenics_right-fenics + - *partitioned-pipe_fluid1-openfoam-pimplefoam_fluid2-openfoam-pimplefoam + - *partitioned-pipe_fluid1-openfoam-sonicliquidfoam_fluid2-openfoam-sonicliquidfoam + - *partitioned-pipe-multiscale_fluid1d-left-nutils_fluid3d-right-openfoam + - *partitioned-pipe-two-phase_fluid1-openfoam_fluid2-openfoam + - *perpendicular-flap_fluid-fake_solid-fake + - *perpendicular-flap_fluid-openfoam_solid-calculix + - *perpendicular-flap_fluid-openfoam_solid-dealii + - *perpendicular-flap_fluid-openfoam_solid-fenics + - *perpendicular-flap_fluid-openfoam_solid-openfoam + - *perpendicular-flap_fluid-su2_solid-fenics + - *quickstart_openfoam_cpp + - *resonant-circuit_capacitor-python_coil-python + - *turek-hron-fsi3_fluid-openfoam_solid-dealii + - *volume-coupled-diffusion_source-fenics_drain-fenics + - *volume-coupled-flow_fluid-openfoam_source-nutils + - *water-hammer_fluid1d-left-nutils_fluid3d-right-openfoam + - *wolf-sheep-soil-creep_soil-creep-landlab_wolf-sheep-grass-mesa + # These test suites take longer to run. They are available, but not regularly executed. extra: tutorials: diff --git a/tools/tests/validate_release_test_shards.py b/tools/tests/validate_release_test_shards.py new file mode 100644 index 000000000..48a64a074 --- /dev/null +++ b/tools/tests/validate_release_test_shards.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +"""Verify release_test_shard_1/2 partition release_test without gaps or duplicates.""" + +from metadata_parser.metdata import Tutorials +from systemtests.Systemtest import Systemtest +from systemtests.SystemtestArguments import SystemtestArguments +from systemtests.TestSuite import TestSuites +from paths import PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR + + +def _cases_for_suite(suite_name: str) -> list[str]: + tutorials = Tutorials.from_path(PRECICE_TUTORIAL_DIR) + suites = TestSuites.from_yaml(PRECICE_TESTS_DIR / "tests.yaml", tutorials) + suite = suites.get_by_name(suite_name) + if suite is None: + raise SystemExit(f"Unknown test suite: {suite_name}") + + build_args = SystemtestArguments.from_args(None) + cases: list[str] = [] + for tutorial in suite.cases_of_tutorial: + for case, reference_result in zip( + suite.cases_of_tutorial[tutorial], + suite.reference_results[tutorial]): + systemtest = Systemtest(tutorial, build_args, case, reference_result) + cases.append(str(systemtest)) + return sorted(cases) + + +def main() -> None: + release = _cases_for_suite("release_test") + shard_1 = _cases_for_suite("release_test_shard_1") + shard_2 = _cases_for_suite("release_test_shard_2") + combined = sorted(shard_1 + shard_2) + + if release != combined: + only_release = set(release) - set(combined) + only_shards = set(combined) - set(release) + duplicates = len(shard_1) + len(shard_2) - len(set(shard_1 + shard_2)) + raise SystemExit( + f"Shard mismatch: release_test={len(release)}, " + f"shard_1={len(shard_1)}, shard_2={len(shard_2)}, " + f"duplicates={duplicates}, only_in_release={len(only_release)}, " + f"only_in_shards={len(only_shards)}") + + print( + f"OK: release_test ({len(release)} cases) = " + f"shard_1 ({len(shard_1)}) + shard_2 ({len(shard_2)})") + + +if __name__ == "__main__": + main() From e29c8188e3fbaf0a6e71da9d607d1c00b4bfba70 Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Fri, 5 Jun 2026 19:51:22 +0530 Subject: [PATCH 2/5] Add changelog entry for PR #829 --- changelog-entries/829.md | 1 + heat-exchanger/download-meshes.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 changelog-entries/829.md create mode 100755 heat-exchanger/download-meshes.sh diff --git a/changelog-entries/829.md b/changelog-entries/829.md new file mode 100644 index 000000000..98bc44fe8 --- /dev/null +++ b/changelog-entries/829.md @@ -0,0 +1 @@ +- Parallelized pull-request system tests via a GitHub Actions matrix over `release_test_shard_1` and `release_test_shard_2` [#829](https://github.com/precice/tutorials/pull/829) diff --git a/heat-exchanger/download-meshes.sh b/heat-exchanger/download-meshes.sh new file mode 100755 index 000000000..02f2a72f7 --- /dev/null +++ b/heat-exchanger/download-meshes.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +echo "This tutorial is based on a case prepared with SimScale." +echo "Since the mesh files are several MB large, we don't store them in the Git repository." +echo "This script downloads and extracts the missing files." +echo "" + +echo "Downloading the Solid case..." +wget -nv -O - https://syncandshare.lrz.de/dl/fi3c9Xt5UzBc5hJvXzsLBHXn/Solid.tar.gz | tar -xzv +mv ./Solid/* solid-calculix +rm -r ./Solid +sed -i 's/Solid/\./g' solid-calculix/solid.inp + +echo "Downloading and extracting the Inner-Fluid mesh..." +wget -nv -O - https://syncandshare.lrz.de/dl/fiNsYGC1DKzgio4jS5NhsXg7/polyMesh.org.tar.gz | tar -xzv -C fluid-inner-openfoam/constant +mv fluid-inner-openfoam/constant/polyMesh.org fluid-inner-openfoam/constant/polyMesh + +echo "Downloading and extracting the Outer-Fluid mesh..." +wget -nv -O - https://syncandshare.lrz.de/dl/fiEZRQ8rcVWRkoyZvANim1R1/polyMesh.org.tar.gz | tar -xzv -C fluid-outer-openfoam/constant +mv fluid-outer-openfoam/constant/polyMesh.org fluid-outer-openfoam/constant/polyMesh + +echo "Completed." From 9d75c1fef125d6148526d59a909488645bebe8c3 Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Sat, 6 Jun 2026 18:15:26 +0530 Subject: [PATCH 3/5] Remove unrelated heat-exchanger/download-meshes.sh from PR --- heat-exchanger/download-meshes.sh | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100755 heat-exchanger/download-meshes.sh diff --git a/heat-exchanger/download-meshes.sh b/heat-exchanger/download-meshes.sh deleted file mode 100755 index 02f2a72f7..000000000 --- a/heat-exchanger/download-meshes.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env sh - -echo "This tutorial is based on a case prepared with SimScale." -echo "Since the mesh files are several MB large, we don't store them in the Git repository." -echo "This script downloads and extracts the missing files." -echo "" - -echo "Downloading the Solid case..." -wget -nv -O - https://syncandshare.lrz.de/dl/fi3c9Xt5UzBc5hJvXzsLBHXn/Solid.tar.gz | tar -xzv -mv ./Solid/* solid-calculix -rm -r ./Solid -sed -i 's/Solid/\./g' solid-calculix/solid.inp - -echo "Downloading and extracting the Inner-Fluid mesh..." -wget -nv -O - https://syncandshare.lrz.de/dl/fiNsYGC1DKzgio4jS5NhsXg7/polyMesh.org.tar.gz | tar -xzv -C fluid-inner-openfoam/constant -mv fluid-inner-openfoam/constant/polyMesh.org fluid-inner-openfoam/constant/polyMesh - -echo "Downloading and extracting the Outer-Fluid mesh..." -wget -nv -O - https://syncandshare.lrz.de/dl/fiEZRQ8rcVWRkoyZvANim1R1/polyMesh.org.tar.gz | tar -xzv -C fluid-outer-openfoam/constant -mv fluid-outer-openfoam/constant/polyMesh.org fluid-outer-openfoam/constant/polyMesh - -echo "Completed." From 1362723772329ebb1fca250526e15c299a89a6cc Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Sat, 6 Jun 2026 19:57:43 +0530 Subject: [PATCH 4/5] Address review: run matrix on latest-components workflow. Move the release_test shard matrix to system-tests-latest-components, restore system-tests-pr to a single release_test job, and clarify README wording on concurrent Docker builds. --- .github/workflows/system-tests-latest-components.yml | 12 ++++++++++-- .github/workflows/system-tests-pr.yml | 12 ++---------- tools/tests/README.md | 11 ++++++----- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/system-tests-latest-components.yml b/.github/workflows/system-tests-latest-components.yml index 07e808213..a9c74c300 100644 --- a/.github/workflows/system-tests-latest-components.yml +++ b/.github/workflows/system-tests-latest-components.yml @@ -168,11 +168,19 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" run-system-tests: - name: Trigger system tests + name: Trigger system tests (shard ${{ matrix.shard }}) needs: gather-refs + strategy: + fail-fast: false + matrix: + include: + - shard: 1 + suites: release_test_shard_1 + - shard: 2 + suites: release_test_shard_2 uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop with: - suites: ${{ inputs.suites || 'release_test' }} + suites: ${{ matrix.suites }} build_args: "PLATFORM:ubuntu_2404,\ PRECICE_REF:${{ needs.gather-refs.outputs.ref-precice }},\ PYTHON_BINDINGS_REF:${{ needs.gather-refs.outputs.ref-python-bindings }},\ diff --git a/.github/workflows/system-tests-pr.yml b/.github/workflows/system-tests-pr.yml index 69ef2c340..f59b6fc70 100644 --- a/.github/workflows/system-tests-pr.yml +++ b/.github/workflows/system-tests-pr.yml @@ -145,20 +145,12 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" run-system-tests: - name: Trigger system tests (shard ${{ matrix.shard }}) + name: Trigger system tests if: ${{ github.event.label.name == 'trigger-system-tests' }} needs: gather-refs - strategy: - fail-fast: false - matrix: - include: - - shard: 1 - suites: release_test_shard_1 - - shard: 2 - suites: release_test_shard_2 uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop with: - suites: ${{ matrix.suites }} + suites: release_test build_args: "PLATFORM:ubuntu_2404,\ PRECICE_REF:${{ needs.gather-refs.outputs.ref-precice }},\ PYTHON_BINDINGS_REF:${{ needs.gather-refs.outputs.ref-python-bindings }},\ diff --git a/tools/tests/README.md b/tools/tests/README.md index 658486ae9..8cdfa89dd 100644 --- a/tools/tests/README.md +++ b/tools/tests/README.md @@ -54,11 +54,12 @@ To be able to fill in the right case tuple into the `tests.yaml`, you can use th ## Running the system tests on GitHub Actions -Pull-request system tests run as a GitHub Actions matrix over `release_test_shard_1` and -`release_test_shard_2` (together they cover the same cases as `release_test`). When a shard -fails, re-run only the failed matrix job. With multiple `precice-tests-vm` runners, shards -may execute concurrently; overlapping Docker image builds are possible and acceptable unless -CI reports failures. +The scheduled [System tests (latest components)](https://github.com/precice/tutorials/actions/workflows/system-tests-latest-components.yml) +workflow runs as a GitHub Actions matrix over `release_test_shard_1` and `release_test_shard_2` +(together they cover the same cases as `release_test`). When a shard fails, re-run only the +failed matrix job. With multiple `precice-tests-vm` runners, shards may execute concurrently +and may rebuild the same component images; we have not seen Docker build conflicts in local +runs, but we can limit parallel jobs or add a shared build step if CI shows issues. Go to Actions > [Run Testsuite (manual)](https://github.com/precice/tutorials/actions/workflows/run_testsuite_manual.yml) to see this workflow. From 38b48134946baff878ff104f3e6e91300e72881c Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Sat, 6 Jun 2026 20:21:14 +0530 Subject: [PATCH 5/5] Compose release_test from shard YAML anchors. Define release_test_shard_1/2 tutorial lists once with YAML anchors and build release_test as their union. Flatten nested list aliases in TestSuite parsing and remove validate_release_test_shards.py. --- tools/tests/systemtests/TestSuite.py | 12 +++- tools/tests/tests.yaml | 62 +++------------------ tools/tests/validate_release_test_shards.py | 51 ----------------- 3 files changed, 19 insertions(+), 106 deletions(-) delete mode 100644 tools/tests/validate_release_test_shards.py diff --git a/tools/tests/systemtests/TestSuite.py b/tools/tests/systemtests/TestSuite.py index a498ca4bd..0604324de 100644 --- a/tools/tests/systemtests/TestSuite.py +++ b/tools/tests/systemtests/TestSuite.py @@ -33,6 +33,15 @@ class TestSuites(list): def __init__(self, testsuites: List[TestSuite]): self.testsuites = testsuites + @staticmethod + def _iter_tutorial_cases(tutorials_section): + """Yield tutorial case dicts, flattening YAML list aliases (e.g. shard lists).""" + for item in tutorials_section: + if isinstance(item, list): + yield from TestSuites._iter_tutorial_cases(item) + else: + yield item + @classmethod def from_yaml(cls, path, parsed_tutorials: Tutorials): """ @@ -55,7 +64,8 @@ def from_yaml(cls, path, parsed_tutorials: Tutorials): max_time_windows_of_tutorial = {} timeouts_of_tutorial = {} # iterate over tutorials: - for tutorial_case in test_suites_raw[test_suite_name]['tutorials']: + for tutorial_case in cls._iter_tutorial_cases( + test_suites_raw[test_suite_name]['tutorials']): tutorial = parsed_tutorials.get_by_path(tutorial_case['path']) if not tutorial: raise Exception(f"No tutorial with path {tutorial_case['path']} found.") diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index cb7f5d1d6..569c0a940 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -500,60 +500,9 @@ test_suites: ##################################################################### ## Test suites referring to the test suites defined above - release_test: - tutorials: - - *breaking-dam-2d_fluid-openfoam_solid-calculix - - *channel-transport_fluid-openfoam_transport-nutils - - *channel-transport-reaction_fluid-fenics_chemical-fenics - - *elastic-tube-1d_fluid-cpp_solid-cpp - - *elastic-tube-1d_fluid-cpp_solid-python - - *elastic-tube-1d_fluid-fortran_solid-fortran - - *elastic-tube-1d_fluid-fortran-module_solid-fortran-module - - *elastic-tube-1d_fluid-python_solid-python - - *elastic-tube-3d_fluid-openfoam_solid-calculix - - *flow-around-controlled-moving-cylinder_controller-fmi_fluid-openfoam_solid-python - - *flow-over-heated-plate_fluid-openfoam_solid-fenics - - *flow-over-heated-plate_fluid-openfoam_solid-nutils - - *flow-over-heated-plate_fluid-openfoam_solid-openfoam - - *flow-over-heated-plate_fluid-su2_solid-openfoam - - *flow-over-heated-plate-nearest-projection_fluid-openfoam_solid-openfoam - - *flow-over-heated-plate-partitioned-flow_fluid1-openfoam_fluid2-openfoam_solid-openfoam - - *flow-over-heated-plate-two-meshes_fluid-openfoam_solid-calculix - - *free-flow-over-porous-media_free-flow-dumux_porous-media-dumux - - *heat-exchanger_fluid-inner-openfoam_solid-calculix_fluid-outer-openfoam - - *heat-exchanger-simplified_fluid-top-openfoam_fluid-bottom-openfoam_solid-calculix - - *multiple-perpendicular-flaps_fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii - - *oscillator_mass-left-fmi_mass-right-fmi - - *oscillator_mass-left-python_mass-right-python - - *oscillator-overlap_mass-left-python_mass-right-python - - *partitioned-backwards-facing-step_fluid1-openfoam_fluid2-openfoam - - *partitioned-elastic-beam_dirichlet-calculix_neumann-calculix - - *partitioned-heat-conduction_dirichlet-fenics_neumann-fenics - - *partitioned-heat-conduction_dirichlet-openfoam_neumann-openfoam - - *partitioned-heat-conduction-complex_dirichlet-fenics_neumann-fenics - - *partitioned-heat-conduction-direct_dirichlet-nutils_neumann-nutils - - *partitioned-heat-conduction-overlap_left-fenics_right-fenics - - *partitioned-pipe_fluid1-openfoam-pimplefoam_fluid2-openfoam-pimplefoam - - *partitioned-pipe_fluid1-openfoam-sonicliquidfoam_fluid2-openfoam-sonicliquidfoam - - *partitioned-pipe-multiscale_fluid1d-left-nutils_fluid3d-right-openfoam - - *partitioned-pipe-two-phase_fluid1-openfoam_fluid2-openfoam - - *perpendicular-flap_fluid-fake_solid-fake - - *perpendicular-flap_fluid-openfoam_solid-calculix - - *perpendicular-flap_fluid-openfoam_solid-dealii - - *perpendicular-flap_fluid-openfoam_solid-fenics - - *perpendicular-flap_fluid-openfoam_solid-openfoam - - *perpendicular-flap_fluid-su2_solid-fenics - - *quickstart_openfoam_cpp - - *resonant-circuit_capacitor-python_coil-python - - *turek-hron-fsi3_fluid-openfoam_solid-dealii - - *volume-coupled-diffusion_source-fenics_drain-fenics - - *volume-coupled-flow_fluid-openfoam_source-nutils - - *water-hammer_fluid1d-left-nutils_fluid3d-right-openfoam - - *wolf-sheep-soil-creep_soil-creep-landlab_wolf-sheep-grass-mesa - - # Shards of release_test for parallel CI (union = release_test, no duplicates). + # Shards of release_test for parallel CI. release_test is their union (YAML anchors). release_test_shard_1: - tutorials: + tutorials: &release_test_shard_1_tutorials - *breaking-dam-2d_fluid-openfoam_solid-calculix - *channel-transport_fluid-openfoam_transport-nutils - *channel-transport-reaction_fluid-fenics_chemical-fenics @@ -580,7 +529,7 @@ test_suites: - *oscillator-overlap_mass-left-python_mass-right-python release_test_shard_2: - tutorials: + tutorials: &release_test_shard_2_tutorials - *partitioned-backwards-facing-step_fluid1-openfoam_fluid2-openfoam - *partitioned-elastic-beam_dirichlet-calculix_neumann-calculix - *partitioned-heat-conduction_dirichlet-fenics_neumann-fenics @@ -606,6 +555,11 @@ test_suites: - *water-hammer_fluid1d-left-nutils_fluid3d-right-openfoam - *wolf-sheep-soil-creep_soil-creep-landlab_wolf-sheep-grass-mesa + release_test: + tutorials: + - *release_test_shard_1_tutorials + - *release_test_shard_2_tutorials + # These test suites take longer to run. They are available, but not regularly executed. extra: tutorials: diff --git a/tools/tests/validate_release_test_shards.py b/tools/tests/validate_release_test_shards.py deleted file mode 100644 index 48a64a074..000000000 --- a/tools/tests/validate_release_test_shards.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python3 -"""Verify release_test_shard_1/2 partition release_test without gaps or duplicates.""" - -from metadata_parser.metdata import Tutorials -from systemtests.Systemtest import Systemtest -from systemtests.SystemtestArguments import SystemtestArguments -from systemtests.TestSuite import TestSuites -from paths import PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR - - -def _cases_for_suite(suite_name: str) -> list[str]: - tutorials = Tutorials.from_path(PRECICE_TUTORIAL_DIR) - suites = TestSuites.from_yaml(PRECICE_TESTS_DIR / "tests.yaml", tutorials) - suite = suites.get_by_name(suite_name) - if suite is None: - raise SystemExit(f"Unknown test suite: {suite_name}") - - build_args = SystemtestArguments.from_args(None) - cases: list[str] = [] - for tutorial in suite.cases_of_tutorial: - for case, reference_result in zip( - suite.cases_of_tutorial[tutorial], - suite.reference_results[tutorial]): - systemtest = Systemtest(tutorial, build_args, case, reference_result) - cases.append(str(systemtest)) - return sorted(cases) - - -def main() -> None: - release = _cases_for_suite("release_test") - shard_1 = _cases_for_suite("release_test_shard_1") - shard_2 = _cases_for_suite("release_test_shard_2") - combined = sorted(shard_1 + shard_2) - - if release != combined: - only_release = set(release) - set(combined) - only_shards = set(combined) - set(release) - duplicates = len(shard_1) + len(shard_2) - len(set(shard_1 + shard_2)) - raise SystemExit( - f"Shard mismatch: release_test={len(release)}, " - f"shard_1={len(shard_1)}, shard_2={len(shard_2)}, " - f"duplicates={duplicates}, only_in_release={len(only_release)}, " - f"only_in_shards={len(only_shards)}") - - print( - f"OK: release_test ({len(release)} cases) = " - f"shard_1 ({len(shard_1)}) + shard_2 ({len(shard_2)})") - - -if __name__ == "__main__": - main()