diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c8fc4d1172d321662355721c3750fb4d19d2b3e..c7fcb81d30f212feb33263ee7af58483ae631fd9 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -261,7 +261,7 @@ build-regression-tests-ci: needs: [] -trigger:regression-tests: +trigger-regression-tests: stage: test needs: - build-regression-tests-ci diff --git a/regression-tests/__regression_test_executer.sh b/regression-tests/__regression_test_executer.sh index b892912ddd5a91f56a4758c57c23b1734b56d5eb..2541619299110bfcb872e48035c6e5e9fb8d7672 100644 --- a/regression-tests/__regression_test_executer.sh +++ b/regression-tests/__regression_test_executer.sh @@ -13,9 +13,8 @@ download_reference_data () { # 1. REFERENCE_DATA_DIR - to download the reference data and compare against # 2. CMAKE_FLAGS - cmake flags for the build of VirtualFluids # 3. APPLICATION - the application to be executed -# 4. PATH_TO_DIR - the path to the produced data to be compared +# 4. RESULT_DATA_DIR - the path to the produced data to be compared run_regression_test () { - download_reference_data $1 rm -rf build && mkdir -p build @@ -27,5 +26,4 @@ run_regression_test () { # execute fieldcompare (A more comprehensive manual can be found here https://gitlab.com/dglaeser/fieldcompare) fieldcompare dir $4 reference_data/$1 --include-files "*.vtu" - } \ No newline at end of file diff --git a/regression-tests/driven_cavity_test.sh b/regression-tests/driven_cavity_test.sh index 97fab49589bc58a65da3d37de7e700c8ee5cf1db..e4a7dcf050c81ea7f3ccd99cffd58edab80959bd 100755 --- a/regression-tests/driven_cavity_test.sh +++ b/regression-tests/driven_cavity_test.sh @@ -12,8 +12,8 @@ CMAKE_FLAGS="--preset=make_gpu -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECT APPLICATION=./build/bin/DrivenCavity # 4. set the path to the produced data -PATH_TO_DIR=output/DrivenCavity +RESULT_DATA_DIR=output/DrivenCavity -run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$PATH_TO_DIR" +run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$RESULT_DATA_DIR" diff --git a/regression-tests/driven_cavity_uniform_test.sh b/regression-tests/driven_cavity_uniform_test.sh index ba6b39b986344ecc020c02fc58dbaed254c518e5..deb1300cad5914e69a4f2c01428bbef31d7af6d3 100755 --- a/regression-tests/driven_cavity_uniform_test.sh +++ b/regression-tests/driven_cavity_uniform_test.sh @@ -13,7 +13,7 @@ CMAKE_FLAGS="--preset=make_gpu -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECT APPLICATION=./build/bin/DrivenCavityUniform # 4. set the path to the produced data -PATH_TO_DIR=output/DrivenCavity_uniform +RESULT_DATA_DIR=output/DrivenCavity_uniform -run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$PATH_TO_DIR" +run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$RESULT_DATA_DIR" diff --git a/utilities/ci-regression-tests/generate-ci.py b/utilities/ci-regression-tests/generate-ci.py index 4bbaf848e674c3cf58afb606e8cd4d29f9be30b3..834728b5b22d7cf566019483a3c405e75c6fc837 100644 --- a/utilities/ci-regression-tests/generate-ci.py +++ b/utilities/ci-regression-tests/generate-ci.py @@ -1,4 +1,3 @@ -from dataclasses import dataclass from jinja2 import Template from pathlib import Path @@ -6,7 +5,7 @@ TEMPLATES_DIR = Path(__file__).parent REGRESSION_CI_TEMPLATE = TEMPLATES_DIR / "regression-tests-ci.yml.j2" GENERATED_DIR = Path("generated") REGRESSION_CI_FILE = GENERATED_DIR / "regression-tests-ci.yml" - +TEST_FILE_DIR = Path("regression-tests") def build_regression_job_string(regression_tests: list[str]) -> str: @@ -15,13 +14,7 @@ def build_regression_job_string(regression_tests: list[str]) -> str: def main(): - - root_dir = "regression-tests" - root_dir_instance = Path(root_dir) - regression_tests_files = [item.stem for item in root_dir_instance.glob("*_test.sh")] - print(regression_tests_files) - - + regression_tests_files = [item.stem for item in TEST_FILE_DIR.glob("*_test.sh")] regression_tests_ci_file = build_regression_job_string(regression_tests_files) REGRESSION_CI_FILE.write_text(regression_tests_ci_file) diff --git a/utilities/ci-regression-tests/regression-tests-ci.yml.j2 b/utilities/ci-regression-tests/regression-tests-ci.yml.j2 index 0ec69187ead38e003e2acd0aa41430e6e60111f7..4367ad6c7d5f820ef8975c37dbf843e5342e4dbd 100644 --- a/utilities/ci-regression-tests/regression-tests-ci.yml.j2 +++ b/utilities/ci-regression-tests/regression-tests-ci.yml.j2 @@ -17,7 +17,7 @@ stages: - pip install fieldcompare {% for regression_test in regression_tests %} -regression-test:{{ regression_test }}: +run-regression-test-{{ regression_test }}: extends: .regression-test script: