Commit 49ccd33c authored by Dennis Gläser's avatar Dennis Gläser Committed by Dennis
Browse files

[ci] do test selection also for mrs in lecture

parent 34294ef2
...@@ -21,6 +21,8 @@ variables: ...@@ -21,6 +21,8 @@ variables:
when: manual when: manual
variables: variables:
DUMUX_MR_BRANCH: $DUMUX_MERGE_REQUEST_BRANCH DUMUX_MR_BRANCH: $DUMUX_MERGE_REQUEST_BRANCH
TRIGGER_SOURCE: $CI_PIPELINE_SOURCE
MR_TARGET_BRANCH_NAME: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
full-dune-2.7-gcc: full-dune-2.7-gcc:
extends: .default-trigger extends: .default-trigger
......
...@@ -10,6 +10,10 @@ workflow: ...@@ -10,6 +10,10 @@ workflow:
rules: rules:
- if: $CI_PIPELINE_SOURCE=="parent_pipeline" - if: $CI_PIPELINE_SOURCE=="parent_pipeline"
variables:
TRIGGER_SOURCE: "unknown"
MR_TARGET_BRANCH_NAME: "master"
select tests: select tests:
stage: configure stage: configure
before_script: before_script:
...@@ -26,8 +30,13 @@ select tests: ...@@ -26,8 +30,13 @@ select tests:
- | - |
dunecontrol --opts=$DUNE_OPTS_FILE --current all dunecontrol --opts=$DUNE_OPTS_FILE --current all
if [[ -n "${DUMUX_MR_BRANCH}" ]]; then if [[ -n "${DUMUX_MR_BRANCH}" ]]; then
python3 dumux/bin/testing/getchangedfiles.py -o changedfiles.txt -t origin/$DUMUX_MR_BRANCH echo "Detecting test affected by changes in Dumux"
python3 dumux/bin/testing/findtests.py -o affectedtests.json --file-list changedfiles.txt python3 dumux/bin/testing/getchangedfiles.py -f dumux -o changedfiles.txt -t origin/$DUMUX_MR_BRANCH
python3 dumux/bin/testing/findtests.py -o affectedtests.json --file-list changedfiles.txt --build-dir build-cmake
elif [[ "$TRIGGER_SOURCE" == "merge_request_event" ]]; then
echo "Detecting test affected by changes in this merge request, using target branch $MR_TARGET_BRANCH_NAME"
python3 dumux/bin/testing/getchangedfiles.py -o changedfiles.txt -t origin/$MR_TARGET_BRANCH_NAME
python3 dumux/bin/testing/findtests.py -o affectedtests.json --file-list changedfiles.txt --build-dir build-cmake
else else
echo "Skipping test selection, build/test stages will consider all tests!" echo "Skipping test selection, build/test stages will consider all tests!"
echo "{}" >> affectedtests.json echo "{}" >> affectedtests.json
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment