From 4eb99c9907b41d36e2e9cf4eb483faf809cdbdeb Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 19:38:22 +0200 Subject: [PATCH 01/12] Move tools/tests/ to tests/ --- {tools/tests => tests}/README.md | 0 {tools/tests => tests}/build_docker_images.py | 0 {tools/tests => tests}/component-templates/aste.yaml | 0 {tools/tests => tests}/component-templates/bare.yaml | 0 .../tests => tests}/component-templates/calculix-adapter.yaml | 0 {tools/tests => tests}/component-templates/dealii-adapter.yaml | 0 {tools/tests => tests}/component-templates/dumux-adapter.yaml | 0 {tools/tests => tests}/component-templates/dune-adapter.yaml | 0 {tools/tests => tests}/component-templates/fenics-adapter.yaml | 0 {tools/tests => tests}/component-templates/fenicsx-adapter.yaml | 0 {tools/tests => tests}/component-templates/fmi-runner.yaml | 0 {tools/tests => tests}/component-templates/julia-bindings.yaml | 0 .../tests => tests}/component-templates/mercurydpm-adapter.yaml | 0 {tools/tests => tests}/component-templates/micro-manager.yaml | 0 {tools/tests => tests}/component-templates/nutils-adapter.yaml | 0 .../tests => tests}/component-templates/openfoam-adapter.yaml | 0 {tools/tests => tests}/component-templates/python-bindings.yaml | 0 {tools/tests => tests}/component-templates/rust-bindings.yaml | 0 {tools/tests => tests}/component-templates/solids4foam.yaml | 0 {tools/tests => tests}/component-templates/su2-adapter.yaml | 0 {tools/tests => tests}/components.yaml | 0 .../tests => tests}/docker-compose.field_compare.template.yaml | 0 {tools/tests => tests}/docker-compose.template.yaml | 0 {tools/tests => tests}/dockerfiles/ubuntu_2404/Dockerfile | 0 {tools/tests => tests}/generate_reference_results.py | 0 {tools/tests => tests}/metadata_parser/__init__.py | 0 {tools/tests => tests}/metadata_parser/metdata.py | 0 {tools/tests => tests}/paths.py | 0 {tools/tests => tests}/print_case_combinations.py | 0 {tools/tests => tests}/print_metadata.py | 0 {tools/tests => tests}/print_test_suites.py | 0 {tools/tests => tests}/reference-results-metadata.md.template | 0 {tools/tests => tests}/reference_versions.yaml | 0 {tools/tests => tests}/requirements-reference.txt | 0 {tools/tests => tests}/requirements.txt | 0 {tools/tests => tests}/rerun-system-test.sh | 0 {tools/tests => tests}/systemtests.py | 0 {tools/tests => tests}/systemtests/Systemtest.py | 0 {tools/tests => tests}/systemtests/SystemtestArguments.py | 0 {tools/tests => tests}/systemtests/TestSuite.py | 0 {tools/tests => tests}/systemtests/__init__.py | 0 {tools/tests => tests}/systemtests/sources.py | 0 {tools/tests => tests}/tests.yaml | 0 tools/check.sh | 2 +- 44 files changed, 1 insertion(+), 1 deletion(-) rename {tools/tests => tests}/README.md (100%) rename {tools/tests => tests}/build_docker_images.py (100%) rename {tools/tests => tests}/component-templates/aste.yaml (100%) rename {tools/tests => tests}/component-templates/bare.yaml (100%) rename {tools/tests => tests}/component-templates/calculix-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/dealii-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/dumux-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/dune-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/fenics-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/fenicsx-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/fmi-runner.yaml (100%) rename {tools/tests => tests}/component-templates/julia-bindings.yaml (100%) rename {tools/tests => tests}/component-templates/mercurydpm-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/micro-manager.yaml (100%) rename {tools/tests => tests}/component-templates/nutils-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/openfoam-adapter.yaml (100%) rename {tools/tests => tests}/component-templates/python-bindings.yaml (100%) rename {tools/tests => tests}/component-templates/rust-bindings.yaml (100%) rename {tools/tests => tests}/component-templates/solids4foam.yaml (100%) rename {tools/tests => tests}/component-templates/su2-adapter.yaml (100%) rename {tools/tests => tests}/components.yaml (100%) rename {tools/tests => tests}/docker-compose.field_compare.template.yaml (100%) rename {tools/tests => tests}/docker-compose.template.yaml (100%) rename {tools/tests => tests}/dockerfiles/ubuntu_2404/Dockerfile (100%) rename {tools/tests => tests}/generate_reference_results.py (100%) rename {tools/tests => tests}/metadata_parser/__init__.py (100%) rename {tools/tests => tests}/metadata_parser/metdata.py (100%) rename {tools/tests => tests}/paths.py (100%) rename {tools/tests => tests}/print_case_combinations.py (100%) rename {tools/tests => tests}/print_metadata.py (100%) rename {tools/tests => tests}/print_test_suites.py (100%) rename {tools/tests => tests}/reference-results-metadata.md.template (100%) rename {tools/tests => tests}/reference_versions.yaml (100%) rename {tools/tests => tests}/requirements-reference.txt (100%) rename {tools/tests => tests}/requirements.txt (100%) rename {tools/tests => tests}/rerun-system-test.sh (100%) rename {tools/tests => tests}/systemtests.py (100%) rename {tools/tests => tests}/systemtests/Systemtest.py (100%) rename {tools/tests => tests}/systemtests/SystemtestArguments.py (100%) rename {tools/tests => tests}/systemtests/TestSuite.py (100%) rename {tools/tests => tests}/systemtests/__init__.py (100%) rename {tools/tests => tests}/systemtests/sources.py (100%) rename {tools/tests => tests}/tests.yaml (100%) diff --git a/tools/tests/README.md b/tests/README.md similarity index 100% rename from tools/tests/README.md rename to tests/README.md diff --git a/tools/tests/build_docker_images.py b/tests/build_docker_images.py similarity index 100% rename from tools/tests/build_docker_images.py rename to tests/build_docker_images.py diff --git a/tools/tests/component-templates/aste.yaml b/tests/component-templates/aste.yaml similarity index 100% rename from tools/tests/component-templates/aste.yaml rename to tests/component-templates/aste.yaml diff --git a/tools/tests/component-templates/bare.yaml b/tests/component-templates/bare.yaml similarity index 100% rename from tools/tests/component-templates/bare.yaml rename to tests/component-templates/bare.yaml diff --git a/tools/tests/component-templates/calculix-adapter.yaml b/tests/component-templates/calculix-adapter.yaml similarity index 100% rename from tools/tests/component-templates/calculix-adapter.yaml rename to tests/component-templates/calculix-adapter.yaml diff --git a/tools/tests/component-templates/dealii-adapter.yaml b/tests/component-templates/dealii-adapter.yaml similarity index 100% rename from tools/tests/component-templates/dealii-adapter.yaml rename to tests/component-templates/dealii-adapter.yaml diff --git a/tools/tests/component-templates/dumux-adapter.yaml b/tests/component-templates/dumux-adapter.yaml similarity index 100% rename from tools/tests/component-templates/dumux-adapter.yaml rename to tests/component-templates/dumux-adapter.yaml diff --git a/tools/tests/component-templates/dune-adapter.yaml b/tests/component-templates/dune-adapter.yaml similarity index 100% rename from tools/tests/component-templates/dune-adapter.yaml rename to tests/component-templates/dune-adapter.yaml diff --git a/tools/tests/component-templates/fenics-adapter.yaml b/tests/component-templates/fenics-adapter.yaml similarity index 100% rename from tools/tests/component-templates/fenics-adapter.yaml rename to tests/component-templates/fenics-adapter.yaml diff --git a/tools/tests/component-templates/fenicsx-adapter.yaml b/tests/component-templates/fenicsx-adapter.yaml similarity index 100% rename from tools/tests/component-templates/fenicsx-adapter.yaml rename to tests/component-templates/fenicsx-adapter.yaml diff --git a/tools/tests/component-templates/fmi-runner.yaml b/tests/component-templates/fmi-runner.yaml similarity index 100% rename from tools/tests/component-templates/fmi-runner.yaml rename to tests/component-templates/fmi-runner.yaml diff --git a/tools/tests/component-templates/julia-bindings.yaml b/tests/component-templates/julia-bindings.yaml similarity index 100% rename from tools/tests/component-templates/julia-bindings.yaml rename to tests/component-templates/julia-bindings.yaml diff --git a/tools/tests/component-templates/mercurydpm-adapter.yaml b/tests/component-templates/mercurydpm-adapter.yaml similarity index 100% rename from tools/tests/component-templates/mercurydpm-adapter.yaml rename to tests/component-templates/mercurydpm-adapter.yaml diff --git a/tools/tests/component-templates/micro-manager.yaml b/tests/component-templates/micro-manager.yaml similarity index 100% rename from tools/tests/component-templates/micro-manager.yaml rename to tests/component-templates/micro-manager.yaml diff --git a/tools/tests/component-templates/nutils-adapter.yaml b/tests/component-templates/nutils-adapter.yaml similarity index 100% rename from tools/tests/component-templates/nutils-adapter.yaml rename to tests/component-templates/nutils-adapter.yaml diff --git a/tools/tests/component-templates/openfoam-adapter.yaml b/tests/component-templates/openfoam-adapter.yaml similarity index 100% rename from tools/tests/component-templates/openfoam-adapter.yaml rename to tests/component-templates/openfoam-adapter.yaml diff --git a/tools/tests/component-templates/python-bindings.yaml b/tests/component-templates/python-bindings.yaml similarity index 100% rename from tools/tests/component-templates/python-bindings.yaml rename to tests/component-templates/python-bindings.yaml diff --git a/tools/tests/component-templates/rust-bindings.yaml b/tests/component-templates/rust-bindings.yaml similarity index 100% rename from tools/tests/component-templates/rust-bindings.yaml rename to tests/component-templates/rust-bindings.yaml diff --git a/tools/tests/component-templates/solids4foam.yaml b/tests/component-templates/solids4foam.yaml similarity index 100% rename from tools/tests/component-templates/solids4foam.yaml rename to tests/component-templates/solids4foam.yaml diff --git a/tools/tests/component-templates/su2-adapter.yaml b/tests/component-templates/su2-adapter.yaml similarity index 100% rename from tools/tests/component-templates/su2-adapter.yaml rename to tests/component-templates/su2-adapter.yaml diff --git a/tools/tests/components.yaml b/tests/components.yaml similarity index 100% rename from tools/tests/components.yaml rename to tests/components.yaml diff --git a/tools/tests/docker-compose.field_compare.template.yaml b/tests/docker-compose.field_compare.template.yaml similarity index 100% rename from tools/tests/docker-compose.field_compare.template.yaml rename to tests/docker-compose.field_compare.template.yaml diff --git a/tools/tests/docker-compose.template.yaml b/tests/docker-compose.template.yaml similarity index 100% rename from tools/tests/docker-compose.template.yaml rename to tests/docker-compose.template.yaml diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tests/dockerfiles/ubuntu_2404/Dockerfile similarity index 100% rename from tools/tests/dockerfiles/ubuntu_2404/Dockerfile rename to tests/dockerfiles/ubuntu_2404/Dockerfile diff --git a/tools/tests/generate_reference_results.py b/tests/generate_reference_results.py similarity index 100% rename from tools/tests/generate_reference_results.py rename to tests/generate_reference_results.py diff --git a/tools/tests/metadata_parser/__init__.py b/tests/metadata_parser/__init__.py similarity index 100% rename from tools/tests/metadata_parser/__init__.py rename to tests/metadata_parser/__init__.py diff --git a/tools/tests/metadata_parser/metdata.py b/tests/metadata_parser/metdata.py similarity index 100% rename from tools/tests/metadata_parser/metdata.py rename to tests/metadata_parser/metdata.py diff --git a/tools/tests/paths.py b/tests/paths.py similarity index 100% rename from tools/tests/paths.py rename to tests/paths.py diff --git a/tools/tests/print_case_combinations.py b/tests/print_case_combinations.py similarity index 100% rename from tools/tests/print_case_combinations.py rename to tests/print_case_combinations.py diff --git a/tools/tests/print_metadata.py b/tests/print_metadata.py similarity index 100% rename from tools/tests/print_metadata.py rename to tests/print_metadata.py diff --git a/tools/tests/print_test_suites.py b/tests/print_test_suites.py similarity index 100% rename from tools/tests/print_test_suites.py rename to tests/print_test_suites.py diff --git a/tools/tests/reference-results-metadata.md.template b/tests/reference-results-metadata.md.template similarity index 100% rename from tools/tests/reference-results-metadata.md.template rename to tests/reference-results-metadata.md.template diff --git a/tools/tests/reference_versions.yaml b/tests/reference_versions.yaml similarity index 100% rename from tools/tests/reference_versions.yaml rename to tests/reference_versions.yaml diff --git a/tools/tests/requirements-reference.txt b/tests/requirements-reference.txt similarity index 100% rename from tools/tests/requirements-reference.txt rename to tests/requirements-reference.txt diff --git a/tools/tests/requirements.txt b/tests/requirements.txt similarity index 100% rename from tools/tests/requirements.txt rename to tests/requirements.txt diff --git a/tools/tests/rerun-system-test.sh b/tests/rerun-system-test.sh similarity index 100% rename from tools/tests/rerun-system-test.sh rename to tests/rerun-system-test.sh diff --git a/tools/tests/systemtests.py b/tests/systemtests.py similarity index 100% rename from tools/tests/systemtests.py rename to tests/systemtests.py diff --git a/tools/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py similarity index 100% rename from tools/tests/systemtests/Systemtest.py rename to tests/systemtests/Systemtest.py diff --git a/tools/tests/systemtests/SystemtestArguments.py b/tests/systemtests/SystemtestArguments.py similarity index 100% rename from tools/tests/systemtests/SystemtestArguments.py rename to tests/systemtests/SystemtestArguments.py diff --git a/tools/tests/systemtests/TestSuite.py b/tests/systemtests/TestSuite.py similarity index 100% rename from tools/tests/systemtests/TestSuite.py rename to tests/systemtests/TestSuite.py diff --git a/tools/tests/systemtests/__init__.py b/tests/systemtests/__init__.py similarity index 100% rename from tools/tests/systemtests/__init__.py rename to tests/systemtests/__init__.py diff --git a/tools/tests/systemtests/sources.py b/tests/systemtests/sources.py similarity index 100% rename from tools/tests/systemtests/sources.py rename to tests/systemtests/sources.py diff --git a/tools/tests/tests.yaml b/tests/tests.yaml similarity index 100% rename from tools/tests/tests.yaml rename to tests/tests.yaml diff --git a/tools/check.sh b/tools/check.sh index 114f80ce1..c823ded02 100755 --- a/tools/check.sh +++ b/tools/check.sh @@ -4,7 +4,7 @@ CODE=0 # Check tutorials -IGNORE="tools|quickstart" +IGNORE="tests|tools|quickstart" tutorials=$(find . -maxdepth 1 -type d -not -name ".*" | grep -vE $IGNORE | sed "s/^.\///") for tutorial in $tutorials; do From a987b4d3ae05763784d5604525f2113927bf8a82 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 19:40:26 +0200 Subject: [PATCH 02/12] Rename references to tools/tests/ to tests/ --- .github/pull_request_template.md | 2 +- .../workflows/generate-reference-results.yml | 4 ++-- .github/workflows/system-tests.yml | 8 ++++---- tests/README.md | 18 +++++++++--------- tests/requirements-reference.txt | 2 +- tests/systemtests/Systemtest.py | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 76bd0bfef..b4187f16e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,7 +10,7 @@ For new tutorials or tutorial cases: - [ ] I followed the [tutorial folder structure](https://precice.org/community-contribute-to-precice.html#contributing-tutorials) - [ ] I added/updated the tutorial `README.md` - [ ] I added/updated the tutorial `metadata.yaml` -- [ ] I added tests in `tools/tests/tests.yaml` +- [ ] I added tests in `tests/tests.yaml` - [ ] I submitted a pull request to the website with: - An entry in [`_config.yaml`](https://github.com/precice/precice.github.io/blob/master/_config.yml) - A [sidebar entry](https://github.com/precice/precice.github.io/blob/master/_data/sidebars/tutorial_sidebar.yml) diff --git a/.github/workflows/generate-reference-results.yml b/.github/workflows/generate-reference-results.yml index 6d94b8b6a..9f38b74e9 100644 --- a/.github/workflows/generate-reference-results.yml +++ b/.github/workflows/generate-reference-results.yml @@ -63,7 +63,7 @@ jobs: rm -rf ./* rm -rf ./.??* ls -la ./ - - name: Check out Tutorials for the system tests (tools/tests/) + - name: Check out Tutorials for the system tests (tests/) uses: actions/checkout@v7 with: ref: ${{ inputs.from_ref }} @@ -71,7 +71,7 @@ jobs: fetch-depth: 0 - name: Install Python dependencies run: | - pip install --user -r tools/tests/requirements.txt + pip install --user -r tests/requirements.txt - name: Cleanup Docker cache if: ${{ inputs.clean_docker == 'TRUE' }} # Remove all Docker containers, images, and build caches diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 2105aea44..53f6de460 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -32,7 +32,7 @@ jobs: echo "System tests branch (tools/): ${{ inputs.system_tests_branch }}" echo "System tests log level: ${{ inputs.log_level }}" echo "Uploading the runs folder on success: ${{ inputs.upload_artifacts }}" - echo "Running the following command inside tutorials/tools/tests/:" + echo "Running the following command inside tutorials/tests/:" echo "python3 systemtests.py --build_args=${{inputs.build_args}} --suites=${{ inputs.suites}}" echo "All workflow inputs: ${{ toJSON(github.event.inputs) }}" - name: Prepare the Markdown step summary @@ -45,7 +45,7 @@ jobs: echo "- System tests log level: \`${{ inputs.log_level }}\`" echo "- Uploading the runs folder on success: \`${{ inputs.upload_artifacts }}\`" echo "" - echo "Running the following command inside \`tutorials/tools/tests/\`:" + echo "Running the following command inside \`tutorials/tests/\`:" echo "\`\`\`" echo "python3 systemtests.py --build_args=${{inputs.build_args}} --suites=${{ inputs.suites}}" echo "\`\`\`" @@ -63,7 +63,7 @@ jobs: rm -rf ./* rm -rf ./.??* ls -la ./ - - name: Check out Tutorials for the system tests (tools/tests/) + - name: Check out Tutorials for the system tests (tests/) uses: actions/checkout@v7 with: repository: precice/tutorials @@ -75,7 +75,7 @@ jobs: /home/precice/runners_root/scripts/map_origin_to_local.sh ./ - name: Install Python dependencies run: | - pip install --user -r tools/tests/requirements.txt + pip install --user -r tests/requirements.txt - name: Run tests run: | cd tools/tests diff --git a/tests/README.md b/tests/README.md index cb6ebd129..0a9a67ecb 100644 --- a/tests/README.md +++ b/tests/README.md @@ -20,7 +20,7 @@ The [System tests (manual)](https://github.com/precice/tutorials/actions/workflo On the workflow page, click `Run workflow`. The default values will execute the `release` test suite using the latest `develop` branches of every component. If you want to override the version of some component, specify it in the respective field. Commit hashes, branches, and tags are all accepted. Branches and tags will get automatically resolved to their current commit on GitHub before starting any test, and all tests will use the same version of any common component. -The available test suites are found in [`tests.yaml`](https://github.com/precice/tutorials/blob/develop/tools/tests/tests.yaml) and common values are: +The available test suites are found in [`tests.yaml`](https://github.com/precice/tutorials/blob/develop/tests/tests.yaml) and common values are: - `quickstart`, `elastic-tube-1d`, or any other tutorial (see [exceptions](https://github.com/precice/tutorials/issues/448)) - `openfoam-adapter`, `micro-manager`, `fmi-runner`, or similar test cases involving the respective component @@ -53,13 +53,13 @@ More arguments are available, for example: gh workflow run system-tests-manual.yml -f suites=release -f build_args="PLATFORM:ubuntu2404,PRECICE_REF:develop" -f log_level="DEBUG" --ref=develop ``` -The `build_args` override the defaults set in `tools/tests/components.yaml`. +The `build_args` override the defaults set in `tests/components.yaml`. ### Running locally To run locally, you will need Docker, Docker Compose, and Python 3. -Navigate into the directory `tools/tests/` of the tutorials, make a Python virtual environment, and install the dependencies: +Navigate into the directory `tests/` of the tutorials, make a Python virtual environment, and install the dependencies: ```bash python -m venv .venv && source .venv/bin/activate @@ -102,7 +102,7 @@ When the tests fail at the results comparison step, this typically means that th - `diff-results/`: Numerical difference of the results in the two directories (computed with `fieldcompare dir --diff precice-exports/ reference/`). These are only present on failed comparisons. - `iterations-logs/`: The `precice-*-iterations.log` files of the test run. Only present in test cases using implicit coupling. The comparisons to references only take into account the file SHA-256 checksums. -To reproduce the comparison locally, use the [same fieldcompare command](https://github.com/precice/tutorials/blob/develop/tools/tests/docker-compose.field_compare.template.yaml): +To reproduce the comparison locally, use the [same fieldcompare command](https://github.com/precice/tutorials/blob/develop/tests/docker-compose.field_compare.template.yaml): ```bash fieldcompare dir \ @@ -157,7 +157,7 @@ Fieldcompare requires reference results in the artifact. If not already unpacked ### Adding new tests -Tests and test suites are defined in [`tests.yaml`](https://github.com/precice/tutorials/blob/develop/tools/tests/tests.yaml). By convention, every tutorial defines a test suite with the same name as its directory, and several test cases using combinations of the available participants. These test cases are later referenced by other test suites: these are typically the `release` and the test suites of different tested components. +Tests and test suites are defined in [`tests.yaml`](https://github.com/precice/tutorials/blob/develop/tests/tests.yaml). By convention, every tutorial defines a test suite with the same name as its directory, and several test cases using combinations of the available participants. These test cases are later referenced by other test suites: these are typically the `release` and the test suites of different tested components. The available cases are listed in the `metadata.yaml` of each tutorial. To add a new tutorial case as a test, add it to `metadata.yaml` and then define a test using it. Include that test in the relevant test suites. @@ -171,7 +171,7 @@ run-before: ./set-case.sh 1d3d You will need to define a reference results file. The reference results can and should be generated on GitHub using the [Generate reference results (manual)](https://github.com/precice/tutorials/actions/workflows/generate-reference-results-manual.yml) workflow for the respective test suite. You might want to temporarily set the `selected` test suite for requesting results only for a subset of test cases. -By default, the [Generate reference results (manual)](https://github.com/precice/tutorials/actions/workflows/generate-reference-results-manual.yml) workflow uses `TUTORIALS_REF` from [`reference_versions.yaml`](https://github.com/precice/tutorials/blob/develop/tools/tests/reference_versions.yaml). For a feature branch, set Use tutorials from to `workflow branch`, or pass `TUTORIALS_REF` via `--build_args` (locally) or the optional `build_args` workflow input. +By default, the [Generate reference results (manual)](https://github.com/precice/tutorials/actions/workflows/generate-reference-results-manual.yml) workflow uses `TUTORIALS_REF` from [`reference_versions.yaml`](https://github.com/precice/tutorials/blob/develop/tests/reference_versions.yaml). For a feature branch, set Use tutorials from to `workflow branch`, or pass `TUTORIALS_REF` via `--build_args` (locally) or the optional `build_args` workflow input. {% note %} The two options cannot be combined: defining any overrides to `reference_versions.yaml` will ignore the option to use the tutorials from the workflow branch. @@ -280,7 +280,7 @@ Metadata and workflow/script files: - `solid-openfoam/` - ... - `metadata.yml`: describes each case directory (which participant, which component, which script to run, ...) -- `tools/tests/` +- `tests/` - `component-templates/`: jinja2 templates for Docker Compose services for the components - `calculix-adapter.yaml` - `fenics-adapter.yaml` @@ -297,7 +297,7 @@ Metadata and workflow/script files: User-facing tools: -- `tools/tests/` +- `tests/` - `systemtests.py`: Executes the system tests, starting Docker Compose services of each required component (after building them), running each test, and comparing the results to reference results. - `print_test_suites.py`: Prints the available tests. - `print_metadata.py`: Prints the metadata of each tutorial that contains a `metadata.yaml` file. @@ -308,7 +308,7 @@ User-facing tools: Implementation scripts: -- `tools/tests/` +- `tests/` - `systemtests.py`: Main entry point - `requirements.txt`: Dependencies (jinja2, pyyaml) - `metadata_parser/`: Reads the YAML files into Python objects (defines the schema) diff --git a/tests/requirements-reference.txt b/tests/requirements-reference.txt index cfc9b3561..900fdeacc 100644 --- a/tests/requirements-reference.txt +++ b/tests/requirements-reference.txt @@ -1,7 +1,7 @@ # Pinned Python dependency versions for this tutorial participant. # Reference only: run scripts keep using loose requirements.txt constraints. # Generated by tools/releasing/update-requirements-reference.py — do not edit manually. -# Source: tools/tests/requirements.txt +# Source: tests/requirements.txt # Generated: 2026-07-13T16:48:40Z jinja2==3.1.6 diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index f756b3ef8..f84f49e5b 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -337,7 +337,7 @@ def render_service_template_per_case(case: Case, params_to_use: Dict[str, str]) # (see __copy_tools). From the point of view of the system test # directory we therefore need to go one level up to reach the # shared `tools/` folder: - # /tools/tests/dockerfiles/ + # /tests/dockerfiles/ # ^-------------^ parent of self.system_test_dir dockerfile_context_relative = ( Path("..") / "tools" / "tests" / "dockerfiles" / Path(plaform_requested) @@ -798,7 +798,7 @@ def __archive_fieldcompare_diffs(self) -> None: ) def __copy_rerun_system_test_script(self) -> None: - """Copy tools/tests/rerun-system-test.sh into the run directory for artifact replay.""" + """Copy tests/rerun-system-test.sh into the run directory for artifact replay.""" rerun_src = PRECICE_TESTS_DIR / "rerun-system-test.sh" if not rerun_src.is_file(): raise FileNotFoundError( From d172c01fce0dbb6a2ac0640e6a2c84413ab432aa Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 19:46:04 +0200 Subject: [PATCH 03/12] Update a path in Systemtest.py --- tests/systemtests/Systemtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index f84f49e5b..f0748775b 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -336,11 +336,11 @@ def render_service_template_per_case(case: Case, params_to_use: Dict[str, str]) # we copy a full `tools/` tree into the parent run directory # (see __copy_tools). From the point of view of the system test # directory we therefore need to go one level up to reach the - # shared `tools/` folder: + # shared `tests/` folder: # /tests/dockerfiles/ # ^-------------^ parent of self.system_test_dir dockerfile_context_relative = ( - Path("..") / "tools" / "tests" / "dockerfiles" / Path(plaform_requested) + Path("..") / "tests" / "dockerfiles" / Path(plaform_requested) ) render_dict = { From 76b187f57ee5e51c8a2aadec0332354ad9b270d7 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 19:46:59 +0200 Subject: [PATCH 04/12] Fix more paths in Systemtest.py --- tests/systemtests/Systemtest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index f0748775b..213c6c1e1 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -381,7 +381,7 @@ def __get_docker_compose_file(self): # absolute – it will be resolved relative to the system test # directory. 'dockerfile_context': ( - Path("..") / "tools" / "tests" / "dockerfiles" / Path(self.params_to_use.get("PLATFORM")) + Path("..") / "tests" / "dockerfiles" / Path(self.params_to_use.get("PLATFORM")) ), 'precice_output_folder': PRECICE_REL_OUTPUT_DIR, } @@ -404,7 +404,7 @@ def __get_field_compare_compose_file(self): # absolute – it will be resolved relative to the system test # directory. 'dockerfile_context': ( - Path("..") / "tools" / "tests" / "dockerfiles" / Path(self.params_to_use.get("PLATFORM")) + Path("..") / "tests" / "dockerfiles" / Path(self.params_to_use.get("PLATFORM")) ), } jinja_env = Environment(loader=FileSystemLoader(PRECICE_TESTS_DIR)) @@ -532,7 +532,7 @@ def __copy_tutorial_into_directory(self, run_directory: Path): self._checkout_ref_in_subfolder(PRECICE_TUTORIAL_DIR, self.tutorial.path, current_ref) def __copy_tools(self, run_directory: Path): - destination = run_directory / "tools" + destination = run_directory src = PRECICE_TOOLS_DIR try: shutil.copytree(src, destination) From 66cb3ad55c7f8552d5cc4937431e8e11d71b3c5d Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 20:10:11 +0200 Subject: [PATCH 05/12] Fix paths in workflows --- .github/workflows/generate-reference-results.yml | 2 +- .github/workflows/system-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-reference-results.yml b/.github/workflows/generate-reference-results.yml index 9f38b74e9..ac7e0d1a1 100644 --- a/.github/workflows/generate-reference-results.yml +++ b/.github/workflows/generate-reference-results.yml @@ -80,7 +80,7 @@ jobs: docker system prune --all --force - name: Run tests run: | - cd tools/tests + cd tests SUITES_ARGS=() if [ -n "${{ inputs.suites }}" ]; then SUITES_ARGS+=(--suites "${{ inputs.suites }}") diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 53f6de460..d2846843a 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -78,7 +78,7 @@ jobs: pip install --user -r tests/requirements.txt - name: Run tests run: | - cd tools/tests + cd tests python systemtests.py --build_args=${{ inputs.build_args}} --suites=${{ inputs.suites}} --log_level=${{ inputs.log_level}} cd ../../ - name: Archive system test logs From b16b2665bc04f8995a0ff74ab1483d9f8604b78f Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 20:15:30 +0200 Subject: [PATCH 06/12] Fix paths in GHA job summary --- .github/workflows/system-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index d2846843a..42983d7c3 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -29,7 +29,7 @@ jobs: run: | echo "Initiated by: ${{ github.actor }}" echo "Test suites: ${{ inputs.suites}}" - echo "System tests branch (tools/): ${{ inputs.system_tests_branch }}" + echo "System tests branch (tests/): ${{ inputs.system_tests_branch }}" echo "System tests log level: ${{ inputs.log_level }}" echo "Uploading the runs folder on success: ${{ inputs.upload_artifacts }}" echo "Running the following command inside tutorials/tests/:" @@ -41,7 +41,7 @@ jobs: echo "Job inputs:" echo "- Initiated by: @${{ github.actor }}" echo "- Test suites: \`${{ inputs.suites}}\`" - echo "- System tests branch (\`tools/\`): [\`${{ inputs.system_tests_branch }}\`](https://github.com/precice/tutorials/tree/${{ inputs.system_tests_branch }})" + echo "- System tests branch (\`tests/\`): [\`${{ inputs.system_tests_branch }}\`](https://github.com/precice/tutorials/tree/${{ inputs.system_tests_branch }})" echo "- System tests log level: \`${{ inputs.log_level }}\`" echo "- Uploading the runs folder on success: \`${{ inputs.upload_artifacts }}\`" echo "" From 53b02c14659c7182db12a5aadf0aa2b5dc3aae05 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 20:26:40 +0200 Subject: [PATCH 07/12] Update more paths and variables --- tests/README.md | 4 ++-- tests/paths.py | 1 - tests/systemtests/Systemtest.py | 16 ++++++++-------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/README.md b/tests/README.md index 0a9a67ecb..d570d235b 100644 --- a/tests/README.md +++ b/tests/README.md @@ -130,7 +130,7 @@ When a system test fails in CI, download the **full** artifact: ```text runs/ -├── tools/ # Dockerfiles and helpers (shared) +├── tests/ # Dockerfiles and helpers (shared) └── __/ # one folder per system test ├── docker-compose.tutorial.yaml ├── docker-compose.field_compare.yaml # written at build time when compare is configured @@ -143,7 +143,7 @@ runs/ To re-run one test locally: -1. Extract the zip and keep the `runs/` layout (the test folder needs the sibling `tools/` directory). +1. Extract the zip and keep the `runs/` layout (the test folder needs the sibling `tests/` directory). 2. `cd` into the test folder. 3. Run `./rerun-system-test.sh` (or `sh rerun-system-test.sh`). diff --git a/tests/paths.py b/tests/paths.py index 8b7f064d2..11a2f19c5 100644 --- a/tests/paths.py +++ b/tests/paths.py @@ -1,7 +1,6 @@ from pathlib import Path PRECICE_TUTORIAL_DIR = Path(__file__).parent.parent.parent PRECICE_TESTS_RUN_DIR = Path(__file__).parent.parent.parent / "runs" -PRECICE_TOOLS_DIR = Path(__file__).parent.parent PRECICE_TESTS_DIR = Path(__file__).parent PRECICE_REL_OUTPUT_DIR = "precice-exports" PRECICE_REL_REFERENCE_DIR = "reference-results-unpacked" diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index 213c6c1e1..b32b38143 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -7,7 +7,7 @@ from dataclasses import dataclass, field import shutil from pathlib import Path -from paths import PRECICE_REL_OUTPUT_DIR, PRECICE_TOOLS_DIR, PRECICE_REL_REFERENCE_DIR, PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR +from paths import PRECICE_REL_OUTPUT_DIR, PRECICE_REL_REFERENCE_DIR, PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR from metadata_parser.metdata import Tutorial, CaseCombination, Case, ReferenceResult from .SystemtestArguments import SystemtestArguments @@ -333,8 +333,8 @@ def __get_docker_services(self) -> Dict[str, str]: def render_service_template_per_case(case: Case, params_to_use: Dict[str, str]) -> str: # Inside the individual system test directory (`self.system_test_dir`) - # we copy a full `tools/` tree into the parent run directory - # (see __copy_tools). From the point of view of the system test + # we copy a full `tests/` tree into the parent run directory + # (see __copy_tests). From the point of view of the system test # directory we therefore need to go one level up to reach the # shared `tests/` folder: # /tests/dockerfiles/ @@ -531,15 +531,15 @@ def __copy_tutorial_into_directory(self, run_directory: Path): file.write(ref_requested) self._checkout_ref_in_subfolder(PRECICE_TUTORIAL_DIR, self.tutorial.path, current_ref) - def __copy_tools(self, run_directory: Path): + def __copy_tests(self, run_directory: Path): destination = run_directory - src = PRECICE_TOOLS_DIR + src = PRECICE_TESTS_DIR try: shutil.copytree(src, destination) except FileExistsError as e: - logging.debug(f"Tools directory has already been copied to the workspace - skipping.") + logging.debug(f"Tests directory has already been copied to the workspace - skipping.") except Exception as e: - logging.warning(f"Something went wrong while copying the tools directory to the workspace: {e}") + logging.warning(f"Something went wrong while copying the tests directory to the workspace: {e}") def __put_gitignore(self, run_directory: Path): # Create the .gitignore file with a single asterisk @@ -1062,7 +1062,7 @@ def __prepare_for_run(self, run_directory: Path): if not self._run_hook('run-before', self.run_before): raise RuntimeError(f"run-before hook failed for {self}") self.__apply_max_time_override() - self.__copy_tools(run_directory) + self.__copy_tests(run_directory) self.__put_gitignore(run_directory) host_uid, host_gid = self.__get_uid_gid() self.params_to_use['PRECICE_UID'] = host_uid From 65af662db8a90ed472309903faebf89cd14c421d Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 20:30:16 +0200 Subject: [PATCH 08/12] Remove a generation of parents --- tests/paths.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/paths.py b/tests/paths.py index 11a2f19c5..864f2ccc9 100644 --- a/tests/paths.py +++ b/tests/paths.py @@ -1,6 +1,6 @@ from pathlib import Path -PRECICE_TUTORIAL_DIR = Path(__file__).parent.parent.parent -PRECICE_TESTS_RUN_DIR = Path(__file__).parent.parent.parent / "runs" -PRECICE_TESTS_DIR = Path(__file__).parent +PRECICE_TUTORIAL_DIR = Path(__file__).parent.parent +PRECICE_TESTS_RUN_DIR = Path(__file__).parent.parent / "runs" +PRECICE_TESTS_DIR = Path(__file__) PRECICE_REL_OUTPUT_DIR = "precice-exports" PRECICE_REL_REFERENCE_DIR = "reference-results-unpacked" From 3719567f5df6b2e7f0d8117cebeda79c83feb3ff Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 14 Aug 2026 20:34:23 +0200 Subject: [PATCH 09/12] PRECICE_TESTS_DIR still needs a parent --- tests/paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/paths.py b/tests/paths.py index 864f2ccc9..5d872f5aa 100644 --- a/tests/paths.py +++ b/tests/paths.py @@ -1,6 +1,6 @@ from pathlib import Path PRECICE_TUTORIAL_DIR = Path(__file__).parent.parent PRECICE_TESTS_RUN_DIR = Path(__file__).parent.parent / "runs" -PRECICE_TESTS_DIR = Path(__file__) +PRECICE_TESTS_DIR = Path(__file__).parent PRECICE_REL_OUTPUT_DIR = "precice-exports" PRECICE_REL_REFERENCE_DIR = "reference-results-unpacked" From b220641a1e6854de57a51274c529f2c42aeae9bc Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 15 Aug 2026 13:41:15 +0200 Subject: [PATCH 10/12] Fix path in __copy_tests --- tests/systemtests/Systemtest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index b32b38143..41a682611 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -532,8 +532,9 @@ def __copy_tutorial_into_directory(self, run_directory: Path): self._checkout_ref_in_subfolder(PRECICE_TUTORIAL_DIR, self.tutorial.path, current_ref) def __copy_tests(self, run_directory: Path): - destination = run_directory + destination = run_directory / "tests" src = PRECICE_TESTS_DIR + logging.info(f"src = {src}, destination = {destination}") try: shutil.copytree(src, destination) except FileExistsError as e: From 6c72d4daca8e0c854972fc5ab14b491eab6639f3 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 15 Aug 2026 13:42:55 +0200 Subject: [PATCH 11/12] Refine debug statement --- tests/systemtests/Systemtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index 41a682611..efc3c10cb 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -534,7 +534,7 @@ def __copy_tutorial_into_directory(self, run_directory: Path): def __copy_tests(self, run_directory: Path): destination = run_directory / "tests" src = PRECICE_TESTS_DIR - logging.info(f"src = {src}, destination = {destination}") + logging.debug(f"Copying tests from {src} to {destination}") try: shutil.copytree(src, destination) except FileExistsError as e: From 2eb2f93f08ef69f22a9ec5b6de551b4cafd9e635 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 15 Aug 2026 13:55:01 +0200 Subject: [PATCH 12/12] We also need to copy the tools --- tests/paths.py | 1 + tests/systemtests/Systemtest.py | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/paths.py b/tests/paths.py index 5d872f5aa..e173aed6d 100644 --- a/tests/paths.py +++ b/tests/paths.py @@ -2,5 +2,6 @@ PRECICE_TUTORIAL_DIR = Path(__file__).parent.parent PRECICE_TESTS_RUN_DIR = Path(__file__).parent.parent / "runs" PRECICE_TESTS_DIR = Path(__file__).parent +PRECICE_TOOLS_DIR = Path(__file__).parent.parent / "tools" PRECICE_REL_OUTPUT_DIR = "precice-exports" PRECICE_REL_REFERENCE_DIR = "reference-results-unpacked" diff --git a/tests/systemtests/Systemtest.py b/tests/systemtests/Systemtest.py index efc3c10cb..44b237611 100644 --- a/tests/systemtests/Systemtest.py +++ b/tests/systemtests/Systemtest.py @@ -7,7 +7,7 @@ from dataclasses import dataclass, field import shutil from pathlib import Path -from paths import PRECICE_REL_OUTPUT_DIR, PRECICE_REL_REFERENCE_DIR, PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR +from paths import PRECICE_REL_OUTPUT_DIR, PRECICE_TOOLS_DIR, PRECICE_REL_REFERENCE_DIR, PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR from metadata_parser.metdata import Tutorial, CaseCombination, Case, ReferenceResult from .SystemtestArguments import SystemtestArguments @@ -334,7 +334,7 @@ def __get_docker_services(self) -> Dict[str, str]: def render_service_template_per_case(case: Case, params_to_use: Dict[str, str]) -> str: # Inside the individual system test directory (`self.system_test_dir`) # we copy a full `tests/` tree into the parent run directory - # (see __copy_tests). From the point of view of the system test + # (see __copy_tools_and_tests). From the point of view of the system test # directory we therefore need to go one level up to reach the # shared `tests/` folder: # /tests/dockerfiles/ @@ -531,9 +531,19 @@ def __copy_tutorial_into_directory(self, run_directory: Path): file.write(ref_requested) self._checkout_ref_in_subfolder(PRECICE_TUTORIAL_DIR, self.tutorial.path, current_ref) - def __copy_tests(self, run_directory: Path): - destination = run_directory / "tests" + def __copy_tools_and_tests(self, run_directory: Path): + src = PRECICE_TOOLS_DIR + destination = run_directory / "tools" + logging.debug(f"Copying tools from {src} to {destination}") + try: + shutil.copytree(src, destination) + except FileExistsError as e: + logging.debug(f"Tools directory has already been copied to the workspace - skipping.") + except Exception as e: + logging.warning(f"Something went wrong while copying the tools directory to the workspace: {e}") + src = PRECICE_TESTS_DIR + destination = run_directory / "tests" logging.debug(f"Copying tests from {src} to {destination}") try: shutil.copytree(src, destination) @@ -1063,7 +1073,7 @@ def __prepare_for_run(self, run_directory: Path): if not self._run_hook('run-before', self.run_before): raise RuntimeError(f"run-before hook failed for {self}") self.__apply_max_time_override() - self.__copy_tests(run_directory) + self.__copy_tools_and_tests(run_directory) self.__put_gitignore(run_directory) host_uid, host_gid = self.__get_uid_gid() self.params_to_use['PRECICE_UID'] = host_uid