summaryrefslogtreecommitdiff
path: root/validate
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-10-16 20:49:26 -0400
committerBen Gamari <ben@smart-cactus.org>2016-10-17 14:33:29 -0400
commit17d696f1a8dcc28074886a2830036144eced6d87 (patch)
tree68d98953c5d4765e9a0a8f09be1ac5d04691abd7 /validate
parentc6ee773a93397c197caa09db9f8d8145d9d930b0 (diff)
downloadhaskell-17d696f1a8dcc28074886a2830036144eced6d87.tar.gz
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
Diffstat (limited to 'validate')
-rwxr-xr-xvalidate10
1 files changed, 8 insertions, 2 deletions
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