From 17d696f1a8dcc28074886a2830036144eced6d87 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 16 Oct 2016 20:49:26 -0400 Subject: validate: Allow user to override Python interpreter Due to #12554 and #12661 we must be quite picky about our choice of Python interpreter on Windows. Allow the user to override it. Test Plan: `PYTHON=/usr/bin/python2 ./validate` on Windows Reviewers: austin, Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2603 GHC Trac Issues: #12554, #12661 --- validate | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'validate') diff --git a/validate b/validate index cf45648c28..8caa0e2b89 100755 --- a/validate +++ b/validate @@ -284,10 +284,16 @@ 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 \ 2>&1 | tee testlog @@ -295,7 +301,7 @@ $make -C testsuite/tests $BINDIST \ # 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 \ 2>&1 | tee testlog-stage1 -- cgit v1.2.1