summaryrefslogtreecommitdiff
path: root/validate
diff options
context:
space:
mode:
authorAlina Banerjee <alina@glitchgirl.us>2021-06-02 22:47:47 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-27 12:01:15 -0400
commit421110b53cde0f0bd6372ea72d1472e1179bd882 (patch)
tree75771e700cf09634942bc6cf05a2a3b11a5d0aff /validate
parent575f1f2f9d9c38b1b93c32e9aca72e5bdf5b4826 (diff)
downloadhaskell-421110b53cde0f0bd6372ea72d1472e1179bd882.tar.gz
validate: add a debug flag (in both Hadrian and legacy Make) for running tests
Diffstat (limited to 'validate')
-rwxr-xr-xvalidate13
1 files changed, 12 insertions, 1 deletions
diff --git a/validate b/validate
index 58f52438cf..1ac68fb0f8 100755
--- a/validate
+++ b/validate
@@ -35,6 +35,7 @@ Flags:
to ignore increases in performance tests
--ignore-perf-decrs Use Hadrian's user settings to ask the "runtests" driver
to ignore decreases in performance tests
+ --debug Use inbuilt Hadrian flag to generate information for debugging
--help shows this usage help.
validate runs 'make -j\$THREADS', where by default THREADS is the number of
@@ -71,6 +72,7 @@ ignore_perf_increases=NO
ignore_perf_decreases=NO
hadrian_build_root=_validatebuild
basedir="$($(dirname $hadrian_build_root) 2>&1 /dev/null && pwd)"
+debugging=0
# Set config_args to empty string if not already set
if [ "${config_args:-""}" ]; then
@@ -119,6 +121,9 @@ do
--ignore-perf-decrs)
ignore_perf_decreases=YES
;;
+ --debug)
+ debugging=1
+ ;;
--help)
show_help
exit 0;;
@@ -238,8 +243,11 @@ if [ $build_only -eq 1 ] ||
echo "V=0" >> mk/are-validating.mk # Less gunk
fi
+ if [ $debugging -eq 1 ]; then
+ make="$make --debug=b --debug=m"
+ fi
+
$make -j"$threads"
- # For a "debug make", add "--debug=b --debug=m"
else
case $speed in
SLOW)
@@ -249,6 +257,9 @@ if [ $build_only -eq 1 ] ||
FAST)
flavour=validate ;;
esac
+ if [ $debugging -eq 1 ]; then
+ hadrian="$hadrian --debug"
+ fi
$hadrian --flavour=$flavour
fi