summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-03-14 13:26:55 -0400
committerBen Gamari <ben@smart-cactus.org>2021-12-09 13:10:30 -0500
commitfc8b5bf2275eff5fb209874d37b7161c9a93c37d (patch)
treeda331d844015e8282b795b4b826f05a9fe8700eb
parentd6177cb5dac357ff15ae048556f03039dd6987d2 (diff)
downloadhaskell-fc8b5bf2275eff5fb209874d37b7161c9a93c37d.tar.gz
gitlab-ci: Respect TEST_TYPE variable
Previously this was dropped in the CI refactoring of !2487.
-rw-r--r--.gitlab-ci.yml18
-rwxr-xr-x.gitlab/ci.sh19
2 files changed, 28 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e3fb4cac90..b0e33aeee2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,6 +24,8 @@ variables:
# Makes ci.sh isolate CABAL_DIR
HERMETIC: "YES"
+ TEST_SPEED: "normal"
+
# Reduce XZ compression level for regular jobs (it is bumped to 9 for releases
# and nightly jobs). In my experiments I've got the following bindist size in
# the given time for each compression level (with the quick flavour):
@@ -441,7 +443,7 @@ lint-libs:
.validate:
variables:
- TEST_TYPE: test
+ TEST_SPEED: normal
MAKE_ARGS: "-Werror"
script: |
# Build hyperlinked sources for documentation when building releases
@@ -771,7 +773,7 @@ nightly-armv7-linux-deb10:
<<: *nightly
extends: .build-armv7-linux-deb10
variables:
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
#################################
# i386-linux-deb9
@@ -799,7 +801,7 @@ nightly-i386-linux-deb9:
<<: *nightly
extends: .build-i386-linux-deb9
variables:
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
#################################
# x86_64-linux-deb9
@@ -832,7 +834,7 @@ nightly-x86_64-linux-deb9:
extends: .build-x86_64-linux-deb9
stage: full-build
variables:
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
# N.B. Has DEBUG assertions enabled in stage2
validate-x86_64-linux-deb9-debug:
@@ -844,7 +846,7 @@ validate-x86_64-linux-deb9-debug:
ValidateSpeed: SLOW
# Override validate flavour default; see #16890.
BUILD_SPHINX_PDF: "YES"
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
TEST_ENV: "x86_64-linux-deb9-debug"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb9-linux-debug.tar.xz"
HADDOCK_HYPERLINKED_SOURCES: "yes"
@@ -870,7 +872,7 @@ nightly-x86_64-linux-deb9-integer-simple:
variables:
BIGNUM_BACKEND: native
TEST_ENV: "x86_64-linux-deb9-integer-simple"
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
.build-x86_64-linux-deb9-tsan:
extends: .validate-linux-hadrian
@@ -925,7 +927,7 @@ nightly-x86_64-linux-deb10:
<<: *nightly
extends: .build-x86_64-linux-deb10
variables:
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
release-x86_64-linux-deb10:
<<: *release
@@ -984,7 +986,7 @@ nightly-x86_64-linux-ubuntu2004:
<<: *nightly
extends: .build-x86_64-linux-ubuntu2004
variables:
- TEST_TYPE: slowtest
+ TEST_SPEED: slow
release-x86_64-linux-ubuntu2004:
<<: *release
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 1eef2143fe..a647698303 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -455,6 +455,14 @@ function determine_metric_baseline() {
}
function test_make() {
+ local test_target
+ case "$TEST_SPEED" in
+ slow) test_target="slowtest" ;;
+ fast) test_target="fasttest" ;;
+ normal) test_target="test" ;;
+ *) fail "Unknown TEST_SPEED" ;;
+ esac
+
if [ -n "${CROSS_TARGET:-}" ]; then
info "Can't test cross-compiled build."
return
@@ -462,7 +470,8 @@ function test_make() {
run "$MAKE" test_bindist TEST_PREP=YES
(unset $(compgen -v | grep CI_*);
- run "$MAKE" V=0 VERBOSE=1 test \
+ run "$MAKE" V=0 VERBOSE=1 \
+ "$test_target" \
THREADS="$cores" \
JUNIT_FILE=../../junit.xml \
EXTRA_RUNTEST_OPTS="${RUNTEST_ARGS:-}")
@@ -519,6 +528,7 @@ function test_hadrian() {
run_hadrian \
test \
+ --test-speed="$TEST_SPEED" \
--summary-junit=./junit.xml \
--test-have-intree-files \
--test-compiler="$TOP/_build/install/bin/ghc$exe" \
@@ -661,6 +671,13 @@ if [ -n "${IGNORE_PERF_FAILURES:-}" ]; then
RUNTEST_ARGS="--ignore-perf-failures=$IGNORE_PERF_FAILURES"
fi
+case "$TEST_SPEED" in
+ slow|fast|normal) ;;
+ "") info "TEST_SPEED unset; defaulting to 'normal'."
+ TEST_SPEED="normal" ;;
+ *) fail "Unknown TEST_SPEED value" ;;
+esac
+
set_toolchain_paths
case $1 in