Skip to content

Commit

Permalink
System tests: Enable preCICE debug messages and symbols via an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Nov 11, 2024
1 parent b718bf4 commit a3bcd83
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
9 changes: 6 additions & 3 deletions tools/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Workflow for the preCICE v3 release testing:
3. Trigger the GitHub Actions Workflow. Until we merge the workflow to develop, this can only happen via the [GitHub CLI](https://cli.github.com/):

```bash
gh workflow run run_testsuite_manual.yml -f suites=release_test -f build_args="PRECICE_REF:v3.1.1,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0,SU2_VERSION:7.5.1,SU2_ADAPTER_REF:64d4aff,TUTORIALS_REF:340b447" --ref=develop
gh workflow run run_testsuite_manual.yml -f suites=release_test -f build_args="PRECICE_REF:v3.1.1,PRECICE_PRESET:production-audit,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0,SU2_VERSION:7.5.1,SU2_ADAPTER_REF:64d4aff,TUTORIALS_REF:340b447" --ref=develop
```

4. Go to the tutorials [Actions](https://github.com/precice/tutorials/actions) page and find the running workflow
Expand Down Expand Up @@ -61,7 +61,7 @@ gh workflow run run_testsuite_manual.yml -f suites=fenics_test --ref=develop
Another example, to use the latest releases and enable debug information of the tests:

```shell
gh workflow run run_testsuite_manual.yml -f suites=fenics_test -f build_args="PRECICE_REF:v3.1.1,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0,SU2_VERSION:7.5.1,SU2_ADAPTER_REF:64d4aff,TUTORIALS_REF:340b447" -f loglevel=DEBUG --ref=develop
gh workflow run run_testsuite_manual.yml -f suites=fenics_test -f build_args="PRECICE_REF:v3.1.1,PRECICE_PRESET:production-audit,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0,SU2_VERSION:7.5.1,SU2_ADAPTER_REF:64d4aff,TUTORIALS_REF:340b447" -f loglevel=DEBUG --ref=develop
```

where the `*_REF` should be a specific [commit-ish](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefcommit-ishacommit-ishalsocommittish).
Expand All @@ -71,7 +71,7 @@ Example output:
```text
Run cd tools/tests
cd tools/tests
python systemtests.py --build_args=PRECICE_REF:v3.1.1,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0 --suites=fenics_test --log-level=DEBUG
python systemtests.py --build_args=PRECICE_REF:v3.1.1,PRECICE_PRESET:production-audit,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0 --suites=fenics_test --log-level=DEBUG
cd ../../
shell: /usr/bin/bash -e {0}
INFO: About to run the following systemtest in the directory /home/precice/runners_root/actions-runner-tutorial/_work/tutorials/tutorials/runs:
Expand Down Expand Up @@ -248,6 +248,9 @@ openfoam-adapter:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand Down
21 changes: 21 additions & 0 deletions tools/tests/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ bare: # A default component used when the solver does not have any dependencies
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand All @@ -19,6 +22,9 @@ python-bindings:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand All @@ -36,6 +42,9 @@ openfoam-adapter:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand All @@ -58,6 +67,9 @@ fenics-adapter:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand All @@ -78,6 +90,9 @@ nutils-adapter:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand All @@ -95,6 +110,9 @@ calculix-adapter:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand All @@ -115,6 +133,9 @@ su2-adapter:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
Expand Down
1 change: 1 addition & 0 deletions tools/tests/docker-compose.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}' &&
sed -i 's|</log>|<sink type="file" output="precice-debug.log" filter="%Severity% >= debug and %Rank% = 0" enabled="true" /></log>|g' precice-config.xml &&
sed -i 's%</participant>%<export:vtk directory=\"../{{precice_output_folder}}\" /> </participant>%g' precice-config.xml &&
sed -i 's|m2n:sockets |m2n:sockets network=\"eth0\" |g' precice-config.xml &&
cat precice-config.xml"
Expand Down
3 changes: 2 additions & 1 deletion tools/tests/dockerfiles/ubuntu_2204/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ RUN python3 -m pip install --user --upgrade pip
FROM precice_dependecies as precice
# Install & build precice into /home/precice/precice
ARG PRECICE_REF
ARG PRECICE_PRESET
USER precice
WORKDIR /home/precice
RUN git clone https://github.com/precice/precice.git precice && \
cd precice && \
git checkout ${PRECICE_REF} && \
mkdir build && cd build &&\
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/precice/.local/ -DPRECICE_PETScMapping=OFF -DBUILD_TESTING=OFF && \
cmake .. --preset=${PRECICE_PRESET} -DCMAKE_INSTALL_PREFIX=/home/precice/.local/ -DPRECICE_PETScMapping=OFF -DBUILD_TESTING=OFF && \
make all install -j $(nproc)

FROM precice_dependecies as openfoam_adapter
Expand Down
1 change: 1 addition & 0 deletions tools/tests/reference_versions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PRECICE_REF: "v3.1.1"
PRECICE_PRESET: "production-audit"
OPENFOAM_EXECUTABLE: "openfoam2312"
OPENFOAM_ADAPTER_REF: "v1.3.0"
PYTHON_BINDINGS_REF: "v3.1.0"
Expand Down

0 comments on commit a3bcd83

Please sign in to comment.