diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c2a39c0131..2d473005b5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,7 +44,7 @@ cache: test-linux: stage: test variables: - RUN_TESTS: "true" + RUN_TESTS: all script: - scripts/gitlab/test-all.sh stable tags: @@ -143,7 +143,7 @@ test-darwin: CARGO_TARGET: x86_64-apple-darwin CC: gcc CXX: g++ - RUN_TESTS: "true" + RUN_TESTS: cargo script: - scripts/gitlab/test-all.sh stable tags: @@ -153,7 +153,7 @@ test-windows: stage: optional variables: CARGO_TARGET: x86_64-pc-windows-msvc - RUN_TESTS: "true" + RUN_TESTS: cargo script: - sh scripts/gitlab/test-all.sh stable tags: @@ -162,7 +162,7 @@ test-windows: test-beta: stage: optional variables: - RUN_TESTS: "true" + RUN_TESTS: cargo script: - scripts/gitlab/test-all.sh beta tags: @@ -171,7 +171,7 @@ test-beta: test-nightly: stage: optional variables: - RUN_TESTS: "true" + RUN_TESTS: all script: - scripts/gitlab/test-all.sh nightly tags: diff --git a/test.sh b/test.sh index bc0fcccd210..b49dfadafac 100755 --- a/test.sh +++ b/test.sh @@ -82,17 +82,19 @@ else validate fi -test "${RUN_TESTS}" = "true" && cpp_test +test "${RUN_TESTS}" = "all" && cpp_test if [ "$CARGO_TARGET" ] then - if [ "${RUN_TESTS}" = "true" ] - then - cargo_test --target $CARGO_TARGET $@ - else - cargo_test --no-run --target $CARGO_TARGET $@ - fi + case "${RUN_TESTS}" in + (cargo|all) + cargo_test --target $CARGO_TARGET $@ + ;; + ('') + cargo_test --no-run --target $CARGO_TARGET $@ + ;; + esac else cargo_test $@ fi