summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-04-06 17:26:28 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-04-06 17:31:30 +0100
commit251bdb8d0ef09f81a4dd225bc39077ba4669b55b (patch)
tree75d35cf01d4c06c3ac75012f32fb8e3398359cd3
parent68e0f650171f6af29dbf3412d910faae9c12f115 (diff)
downloadhaskell-wip/ghc-9.0-fedora-release-bindist.tar.gz
ci: Add test to check that release jobs have profiling librarieswip/ghc-9.0-fedora-release-bindist
-rwxr-xr-x.gitlab/ci.sh10
-rw-r--r--bindisttest/Makefile6
2 files changed, 15 insertions, 1 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index a8cbdb6fbe..20ae2ff4a0 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -457,7 +457,7 @@ function test_make() {
return
fi
- run "$MAKE" test_bindist TEST_PREP=YES
+ run "$MAKE" test_bindist TEST_PREP=YES TEST_PROF=$RELEASE_JOB
run "$MAKE" V=0 VERBOSE=1 test \
THREADS="$cores" \
JUNIT_FILE=../../junit.xml \
@@ -497,6 +497,14 @@ function test_hadrian() {
esac
cd ../../../
+ # If we are doing a release job, check the compiler can build a profiled executable
+ if [ "${RELEASE_JOB:-}" == "yes" ]; then
+ echo "main = print ()" > proftest.hs
+ $TOP/_build/install/bin/ghc$exe -prof proftest.hs
+ rm proftest.hs
+ fi
+
+
run_hadrian \
test \
--summary-junit=./junit.xml \
diff --git a/bindisttest/Makefile b/bindisttest/Makefile
index e49172c77d..3df55a9167 100644
--- a/bindisttest/Makefile
+++ b/bindisttest/Makefile
@@ -50,6 +50,12 @@ endif
$(CONTEXT_DIFF) output expected_output
# Without --no-user-package-db we might pick up random packages from ~/.ghc
$(BIN_DIST_INST_DIR)/bin/ghc-pkg check --no-user-package-db
+ifeq "$(TEST_PROF)" "yes"
+ $(BIN_DIST_INST_DIR)/bin/ghc --make -prof HelloWorld
+ ./HelloWorld > output
+ $(CONTEXT_DIFF) output expected_output
+endif
+
clean distclean:
"$(RM)" $(RM_OPTS_REC) $(BIN_DIST_INST_SUBDIR)