[commit: ghc] master: validate: Allow user to override Python interpreter (17d696f)

git at git.haskell.org git at git.haskell.org
Mon Oct 17 19:02:34 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/17d696f1a8dcc28074886a2830036144eced6d87/ghc

>---------------------------------------------------------------

commit 17d696f1a8dcc28074886a2830036144eced6d87
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sun Oct 16 20:49:26 2016 -0400

    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


>---------------------------------------------------------------

17d696f1a8dcc28074886a2830036144eced6d87
 validate | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/validate b/validate
index cf45648..8caa0e2 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



More information about the ghc-commits mailing list