diff --git a/regression-tests/README.md b/regression-tests/README.md new file mode 100644 index 0000000000000000000000000000000000000000..adf89d802df2546b642aefe43f04e762828b8e33 --- /dev/null +++ b/regression-tests/README.md @@ -0,0 +1,5 @@ +# How to add a new regression test? +# 1. setup the specfic simulation and run it to create reference data. +# 2. fork https://github.com/irmb/test_data and create a pull request containing the reference data. +# 3. copy ./regression-tests/driven_cavity_test.sh and adjust the file accordingly to the new test scenario. +# 4. execute this file from here accordingly to #3. \ No newline at end of file diff --git a/regression-tests/driven_cavity_test.sh b/regression-tests/driven_cavity_test.sh index b8998e309a4553cba96c015c83d45e35274e3e56..4fbe1a6fdc708581bf1e2ae2a66149a0f97386ad 100755 --- a/regression-tests/driven_cavity_test.sh +++ b/regression-tests/driven_cavity_test.sh @@ -3,6 +3,10 @@ ################################# # Driven Cavity Regression Test ################################# +rm -r reference_data && mkdir -p reference_data +git clone --depth 1 --filter=blob:none --sparse https://github.com/irmb/test_data reference_data +cd reference_data +git sparse-checkout add regression_tests/gpu/DrivenCavity_2Levels # build VirtualFluids accordingly to our specific test scenario. # in this case adding -DUSER_APPS="apps/gpu/LBM/DrivenCavity to the cmake command is not necessary, because the DrivenCavity is added to VirtualFluids by default. diff --git a/regression-tests/driven_cavity_uniform_test.sh b/regression-tests/driven_cavity_uniform_test.sh index ae47c98af85252fb61aeb5fb7e4315692ab4b866..94262af9e67a9413d7619fa921d505c8ea82cf03 100755 --- a/regression-tests/driven_cavity_uniform_test.sh +++ b/regression-tests/driven_cavity_uniform_test.sh @@ -3,6 +3,10 @@ ################################# # Driven Cavity Regression Test ################################# +rm -r reference_data && mkdir -p reference_data +git clone --depth 1 --filter=blob:none --sparse https://github.com/irmb/test_data reference_data +cd reference_data +git sparse-checkout add regression_tests/gpu/DrivenCavity_uniform # build VirtualFluids accordingly to our specific test scenario. # in this case adding -DUSER_APPS="apps/gpu/LBM/DrivenCavity to the cmake command is not necessary, because the DrivenCavity is added to VirtualFluids by default. diff --git a/regression-tests/regression-tests.sh b/regression-tests/regression-tests.sh deleted file mode 100755 index e4cb07c63369cd1c1743e7e223812830caafe02f..0000000000000000000000000000000000000000 --- a/regression-tests/regression-tests.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -################################# -# VirtualFludis regression tests -################################# - - -# 1. Cloning the reference data from github -rm -r reference_data && mkdir -p reference_data -git clone https://github.com/irmb/test_data reference_data - -# 2. set up the python environnement -# by cloning our meshio patch and fieldcompare into a venv -python3 -m venv .venv -source .venv/bin/activate -pip install fieldcompare - -# 3. Running the specific tests -./regression-tests/driven_cavity_uniform_test.sh -./regression-tests/driven_cavity_test.sh - - - -# How to add a new regression test? -# 1. setup the specfic simulation and run it to create reference data. -# 2. fork https://github.com/irmb/test_data and create a pull request containing the reference data. -# 3. copy ./regression-tests/driven_cavity_test.sh and adjust the file accordingly to the new test scenario. -# 4. execute this file from here accordingly to #3. \ No newline at end of file diff --git a/utilities/ci-regression-tests/regression-tests-ci.yml.j2 b/utilities/ci-regression-tests/regression-tests-ci.yml.j2 index 000325a3e390cd39539ff2906ca0af1c8b7bca98..0ec69187ead38e003e2acd0aa41430e6e60111f7 100644 --- a/utilities/ci-regression-tests/regression-tests-ci.yml.j2 +++ b/utilities/ci-regression-tests/regression-tests-ci.yml.j2 @@ -14,6 +14,7 @@ stages: before_script: - chmod +x ./regression-tests/* + - pip install fieldcompare {% for regression_test in regression_tests %} regression-test:{{ regression_test }}: