From 421110b53cde0f0bd6372ea72d1472e1179bd882 Mon Sep 17 00:00:00 2001 From: Alina Banerjee Date: Wed, 2 Jun 2021 22:47:47 -0500 Subject: validate: add a debug flag (in both Hadrian and legacy Make) for running tests --- validate | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1