Skip to content
Snippets Groups Projects
Verified Commit 0a0dd6c9 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Added CTEST_ARGS setting and removed include and exclude variables.

parent e6824218
No related branches found
No related tags found
No related merge requests found
...@@ -10,8 +10,7 @@ variables: ...@@ -10,8 +10,7 @@ variables:
BUILD_TYPE: Release BUILD_TYPE: Release
BUILD_TESTS: "true" BUILD_TESTS: "true"
BUILD_CTEST: "true" BUILD_CTEST: "true"
CTEST_INCLUDE_REGEX: "" # Regex is given via ctest -R [regex] CTEST_ARGS: "" # If not empty supply arguments to select tests
CTEST_EXCLUDE_REGEX: "" # Regex is given via ctest -E [regex]
CPU_TARGET: ivybridge # envinf1 has oldest cpu CPU_TARGET: ivybridge # envinf1 has oldest cpu
ARTIFACTS_PAGES_URL: https://$CI_PROJECT_ROOT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts ARTIFACTS_PAGES_URL: https://$CI_PROJECT_ROOT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts
PIPELINE_NAME: "Default pipeline name" PIPELINE_NAME: "Default pipeline name"
......
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
xvfb_run_cmd="xvfb-run -a" xvfb_run_cmd="xvfb-run -a"
fi fi
regex_argument="" ctest_arguments=""
if [[ ! -z "$CTEST_INCLUDE_REGEX" ]]; then if [[ ! -z "$CTEST_ARGS" ]]; then
regex_argument="-R ${CTEST_INCLUDE_REGEX}" ctest_arguments="${CTEST_ARGS}"
fi ctest_timeout=90 # Assume large
if [[ ! -z "$CTEST_EXCLUDE_REGEX" ]]; then else
regex_argument="${regex_argument} -E ${CTEST_EXCLUDE_REGEX}" ctest_arguments="--preset=${CMAKE_PRESET}${preset_postfix}"
fi fi
ctest_group="Experimental" ctest_group="Experimental"
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
ctest_group="master" ctest_group="master"
fi fi
${xvfb_run_cmd} ctest -M Experimental --group ${ctest_group} ${regex_argument} --test-dir ${build_dir_full} -T Start -T Test -T Submit --preset=${CMAKE_PRESET}${preset_postfix} --output-junit Tests/ctest.xml --stop-time `date -d "today + ${ctest_timeout} minutes" +'%H:%M:%S'` ${CTEST_ARGS} ${xvfb_run_cmd} ctest -M Experimental --group ${ctest_group} ${regex_argument} --test-dir ${build_dir_full} -T Start -T Test -T Submit ${ctest_arguments} --output-junit Tests/ctest.xml --stop-time `date -d "today + ${ctest_timeout} minutes" +'%H:%M:%S'` ${CTEST_ARGS}
fi fi
else else
......
...@@ -65,7 +65,9 @@ These variables in `.gitlab-ci.yml` modify the pipeline: ...@@ -65,7 +65,9 @@ These variables in `.gitlab-ci.yml` modify the pipeline:
- `BUILD_TESTS`: Set this to `false` to disable unit tests. - `BUILD_TESTS`: Set this to `false` to disable unit tests.
- `BUILD_CTEST`: Set this to `false` to disable ctest (benchmark) tests. - `BUILD_CTEST`: Set this to `false` to disable ctest (benchmark) tests.
- `CTEST_INCLUDE_REGEX`: Set this to a regex to select benchmarks to run, e.g. `nb` would select all notebook-based tests and would disable all other benchmarks. - `CTEST_ARGS`: Supply additional arguments to the `ctest`-command to select which benchmarks are run, e.g.:
- `-R nb` would select all notebook-based tests and would disable all other benchmarks
- `-LE large` would exclude all tests with label `large`
All jobs get included in the `include:`-section in the file `scripts/ci/pipelines/regular.yml`. You can simple comment out files to disable jobs defined in that files. Please note that some jobs depend on other jobs. All jobs get included in the `include:`-section in the file `scripts/ci/pipelines/regular.yml`. You can simple comment out files to disable jobs defined in that files. Please note that some jobs depend on other jobs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment