[commit: ghc] master: testsuite: Use python3 by default (605bb9b)

git at git.haskell.org git at git.haskell.org
Wed Nov 30 02:14:01 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/605bb9b4608121c462fb3d9f9281e7427f7ccc72/ghc

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

commit 605bb9b4608121c462fb3d9f9281e7427f7ccc72
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Tue Nov 29 16:58:24 2016 -0500

    testsuite: Use python3 by default
    
    Summary:
    It turns out that Phyx's fix for #12554 (D2684) still fails with mingw-w64
    python 2.7. However, Python 3 (both msys2 and mingw-w64) work fine. Given that
    supporting Python 2 has already become rather tiresome (as @thomie warned it
    would), let's just move to python3 by default.
    
    Test Plan: Validate
    
    Reviewers: austin, Phyx
    
    Reviewed By: Phyx
    
    Subscribers: Phyx, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2766
    
    GHC Trac Issues: #12554


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

605bb9b4608121c462fb3d9f9281e7427f7ccc72
 testsuite/driver/runtests.py |  5 ++---
 testsuite/mk/boilerplate.mk  | 10 +---------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 1b6fe12..28b393a 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
 #
 # (c) Simon Marlow 2002
 #
@@ -24,9 +26,6 @@ import re
 import subprocess
 
 PYTHON3 = sys.version_info >= (3, 0)
-if PYTHON3:
-    print("*** WARNING: running testsuite using Python 3.\n"
-          "*** Python 3 support is experimental. See Trac #9184.")
 
 from testutil import *
 from testglobals import *
diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk
index 1aa58ab..93b4f01 100644
--- a/testsuite/mk/boilerplate.mk
+++ b/testsuite/mk/boilerplate.mk
@@ -217,15 +217,7 @@ $(eval $(call canonicalise,TOP_ABS))
 GS = gs
 CP = cp
 RM = rm -f
-# Allow the user to override the python version, just like with validate
-ifeq "$(shell $(SHELL) -c '$(PYTHON) -c 0' 2> /dev/null && echo exists)" "exists"
-else
-ifeq "$(shell $(SHELL) -c 'python2 -c 0' 2> /dev/null && echo exists)" "exists"
-PYTHON = python2
-else
-PYTHON = python
-endif
-endif
+PYTHON = python3
 
 CHECK_API_ANNOTATIONS := $(abspath $(TOP)/../inplace/bin/check-api-annotations)
 



More information about the ghc-commits mailing list