Design and Implementation of system tests for the distributed multi-physics simulation package preCICE
Make sure to install
- preCICE (https://github.com/precice/precice/wiki)
- docker (see https://docs.docker.com/install/linux/docker-ce/ubuntu/)
- make sure you can run docker as non-root user (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)
- test your docker installation with
docker run hello-world
python3
- with
configparser
(install for example withpip3 install configparser
)
- with
- additional dependencies depending on the test you want to run
Example command:
python3 local_test.py -b mpi_single_ports -s of-of su2-ccx -f precice
see python3 local_test.py --help
for explanation of the command line arguments.
- If you receive an error like
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com'
, the following answer on stackoverflow might help. Even, if the suggested verification step does not work, give the systemtests another try. Sometimes it works... - If you run into problems during compilation of preCICE in your docker container, try to use
python3 local_test.py --force_rebuild precice
.
- Dockerfile.precice docker image with ubuntu 16.04 and preCICE preCICE - github
- su2-ccx coupled simulation with SU2 and CalculiX FSI tutorial
- of-of coupled simulation with OpenFOAM Tutorial for CHT: Flow over a heated plate
- of-ccx conjugate heat transfer simulation with OpenFOAM and CalculiX Tutorial for CHT with OpenFOAM and CalculiX
- precice Testing some components of preCICE: dummy solvers and Python bindings
Continuous Integration config. Two build stages:
- stage 1 (build stage): precice docker image build and pushed to Docker Hub
- stage 2 (testing stage): build su2-ccx, of-of, of-ccx and push outputfiles to repo
Python script to compare reference data with output data.
- Makefile_*: needed to build calculix-adapter in su2-ccx and of-ccx
- push_*: script to push outputfiles back to rep HowTo
- How to push to hub.docker.com link1 link2
- log_*: script to log infomation about the build
- Create a directory
Test_mysystemtest
. - Create a
Dockerfile
in there. - Create a directory
referenceOutput
there. - Copy the output files to a folder
/Output/
(inside the container).
As described in #22, using trigger_systemtests.py
it is possible to trigger custom systemtests from the travis job of the another adapter, therefore providing continous integration for the adapter on each commit to a particular branch. If you want to add another adapter, or modify tests that are run for it, you need to modify nm_repo_map
and nm_test_map
variables in the trigger_systemtests.py
, that describe mapping between adapter name and repository and adapter name and set of test cases correspondingly.
The adapter's Travis build would be considered successful if systemtests Travis build exits with status 'Failed' or 'Errored'. It would exit with 'Success', if the systemtests Travis build exits with 'Success' or 'Canceled'.