Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions tools/tests/docker-compose.field_compare.template.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
services:
field-compare:
build: https://github.com/dglaeser/fieldcompare-action.git # use the docker container provided by fieldcompare
build:
context: {{ dockerfile_context }}
target: fieldcompare
volumes:
- {{ run_directory }}:/runs
command:
- /runs/{{ tutorial_folder }}/{{ precice_output_folder }}
- /runs/{{ tutorial_folder }}/{{ reference_output_folder }}
- "-rtol {{ tolerance }} --ignore-missing-reference-files --exclude-files reference-results-metadata.txt --ignore-unsupported-file-formats --diff"
command: >
/bin/bash -c "fieldcompare dir \
--ignore-missing-reference-files --exclude-files reference-results-metadata.txt --ignore-unsupported-file-formats --diff \
-rtol {{ tolerance }} \
/runs/{{ tutorial_folder }}/{{ precice_output_folder }} \
/runs/{{ tutorial_folder }}/{{ reference_output_folder }}"
7 changes: 5 additions & 2 deletions tools/tests/dockerfiles/ubuntu_2404/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ RUN cd /home/precice/aste && \
WORKDIR /home/precice


FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam
FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest AS solids4foam

ARG PRECICE_UID=1000
ARG PRECICE_GID=1000
Expand Down Expand Up @@ -625,4 +625,7 @@ RUN git clone https://github.com/precice/openfoam-adapter.git &&\
cd openfoam-adapter && \
if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \
git checkout ${OPENFOAM_ADAPTER_REF} && \
/usr/bin/openfoam2412 ./Allwmake -j $(nproc)
/usr/bin/openfoam2412 ./Allwmake -j $(nproc)

FROM python:3.14 AS fieldcompare
RUN pip install fieldcompare[all]==0.5.0
7 changes: 7 additions & 0 deletions tools/tests/systemtests/Systemtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,13 @@ def __get_field_compare_compose_file(self):
'precice_output_folder': PRECICE_REL_OUTPUT_DIR,
'reference_output_folder': PRECICE_REL_REFERENCE_DIR + "/" + self.reference_result.path.name.replace(".tar.gz", ""),
'tolerance': self.tolerance,
# The dockerfile_context value inside the templates is only
# used as a build context path and does not need to be
# absolute – it will be resolved relative to the system test
# directory.
'dockerfile_context': (
Path("..") / "tools" / "tests" / "dockerfiles" / Path(self.params_to_use.get("PLATFORM"))
),
}
jinja_env = Environment(loader=FileSystemLoader(PRECICE_TESTS_DIR))
template = jinja_env.get_template(
Expand Down