No relative inclusion of HsVersions.h
[ghc.git] / validate
index cf45648..77bc002 100755 (executable)
--- a/validate
+++ b/validate
@@ -176,14 +176,14 @@ if [ $testsuite_only -eq 0 ]; then
 thisdir=`pwd`
 
 if [ $no_clean -eq 0 ]; then
-    $make maintainer-clean NO_CLEAN_GMP=YES
+    $make maintainer-clean
 
     INSTDIR="$thisdir/inst"
 
     if [ $use_dph -eq 1 ]; then
-        perl -w boot --validate --required-tag=dph
+        python3 ./boot --validate --required-tag=dph
     else
-        perl -w boot --validate
+        python3 ./boot --validate
     fi
     ./configure --prefix="$INSTDIR" $config_args
 fi
@@ -284,20 +284,28 @@ if [ $be_quiet -eq 1 ] && [ -z $VERBOSE ]; then
     TEST_VERBOSITY="VERBOSE=1"
 fi
 
+# We need to be quite picky on Windows about which Python interpreter we use
+# (#12554, #12661). Allow the user to override it.
+if [ "z$PYTHON" != "z" ]; then
+    PYTHON_ARG="PYTHON=$PYTHON"
+fi
+
 rm -f testsuite_summary.txt testsuite_summary_stage1.txt
 
 # Use LOCAL=0, see Note [Running tests in /tmp].
-$make -C testsuite/tests $BINDIST \
+$make -C testsuite/tests $BINDIST $PYTHON_ARG \
       $MAKE_TEST_TARGET stage=2 LOCAL=0 $TEST_VERBOSITY THREADS=$threads \
       NO_PRINT_SUMMARY=YES SUMMARY_FILE=../../testsuite_summary.txt \
+      JUNIT_FILE=../../testsuite.xml \
       2>&1 | tee testlog
 
 # Run a few tests using the stage1 compiler.
 # See Note [Why is there no stage1 setup function?].
 # Don't use BINDIST=YES, as stage1 is not available in a bindist.
-$make -C testsuite/tests/stage1 \
+$make -C testsuite/tests/stage1 $PYTHON_ARG \
       $MAKE_TEST_TARGET stage=1 LOCAL=0 $TEST_VERBOSITY THREADS=$threads \
       NO_PRINT_SUMMARY=YES SUMMARY_FILE=../../../testsuite_summary_stage1.txt \
+      JUNIT_FILE=../../../testsuite_stage1.xml \
       2>&1 | tee testlog-stage1
 
 echo