diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ad338d0..c0200199 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,7 +39,8 @@ static-code-analysis: stage: checks <<: *only-default script: - - "./test/static_code_analysis.sh" + # Note: This script uses CI_PROJECT_DIR + - su pmos -c "CI_PROJECT_DIR=$CI_PROJECT_DIR .gitlab/shared-runner_test-pmbootstrap.sh --static-code-analysis" # MR settings # (Checks for "Allow commits from members who can merge to the target branch") @@ -55,7 +56,7 @@ test-pmbootstrap: <<: *only-default script: # Note: This script uses CI_PROJECT_DIR - - su pmos -c "CI_PROJECT_DIR=$CI_PROJECT_DIR .gitlab/shared-runner_test-pmbootstrap.sh" + - su pmos -c "CI_PROJECT_DIR=$CI_PROJECT_DIR .gitlab/shared-runner_test-pmbootstrap.sh --testcases-fast" after_script: # Move logs so it can be saved as artifacts - "[[ -f /home/pmos/.local/var/pmbootstrap/log.txt ]] && mv /home/pmos/.local/var/pmbootstrap/log.txt $CI_PROJECT_DIR/log.txt" diff --git a/.gitlab/shared-runner_test-pmbootstrap.sh b/.gitlab/shared-runner_test-pmbootstrap.sh index 8626857d..aceb9ba4 100755 --- a/.gitlab/shared-runner_test-pmbootstrap.sh +++ b/.gitlab/shared-runner_test-pmbootstrap.sh @@ -29,5 +29,12 @@ set +o pipefail yes | ./pmbootstrap.py zap -m -p set -o pipefail -# testcases_fast (qemu is omitted by not passing --all) -./test/testcases_fast.sh +case $1 in + --static-code-analysis ) + ./test/static_code_analysis.sh + ;; + --testcases-fast ) + # testcases_fast (qemu is omitted by not passing --all) + ./test/testcases_fast.sh + ;; +esac