run-tests: drop support for --with-python3 and $PYTHON3
authorYuya Nishihara <yuya@tcha.org>
Sun, 02 Sep 2018 16:32:11 +0900
changeset 39403 66b5ded95185
parent 39402 ecbab8be7470
child 39404 90afd61ef8a2
run-tests: drop support for --with-python3 and $PYTHON3 This backs out cdbc25306696. We can run many tests on python3 without this hack.
tests/run-tests.py
--- a/tests/run-tests.py	Sun Sep 02 16:26:33 2018 +0900
+++ b/tests/run-tests.py	Sun Sep 02 16:32:11 2018 +0900
@@ -395,11 +395,6 @@
         metavar="HG",
         help="test using specified hg script rather than a "
              "temporary installation")
-    # This option should be deleted once test-check-py3-compat.t and other
-    # Python 3 tests run with Python 3.
-    hgconf.add_argument("--with-python3", metavar="PYTHON3",
-        help="Python 3 interpreter (if running under Python 2)"
-             " (TEMPORARY)")
 
     reporting = parser.add_argument_group('Results Reporting')
     reporting.add_argument("-C", "--annotate", action="store_true",
@@ -533,27 +528,6 @@
         if PYTHON3:
             parser.error(
                 '--py3k-warnings can only be used on Python 2.7')
-    if options.with_python3:
-        if PYTHON3:
-            parser.error('--with-python3 cannot be used when executing with '
-                         'Python 3')
-
-        options.with_python3 = canonpath(options.with_python3)
-        # Verify Python3 executable is acceptable.
-        proc = subprocess.Popen([options.with_python3, b'--version'],
-                                stdout=subprocess.PIPE,
-                                stderr=subprocess.STDOUT)
-        out, _err = proc.communicate()
-        ret = proc.wait()
-        if ret != 0:
-            parser.error('could not determine version of python 3')
-        if not out.startswith('Python '):
-            parser.error('unexpected output from python3 --version: %s' %
-                         out)
-        vers = version.LooseVersion(out[len('Python '):])
-        if vers < version.LooseVersion('3.5.0'):
-            parser.error('--with-python3 version must be 3.5.0 or greater; '
-                         'got %s' % out)
 
     if options.blacklist:
         options.blacklist = parselistfiles(options.blacklist, 'blacklist')
@@ -2611,9 +2585,6 @@
         osenvironb[b"BINDIR"] = self._bindir
         osenvironb[b"PYTHON"] = PYTHON
 
-        if self.options.with_python3:
-            osenvironb[b'PYTHON3'] = self.options.with_python3
-
         fileb = _bytespath(__file__)
         runtestdir = os.path.abspath(os.path.dirname(fileb))
         osenvironb[b'RUNTESTDIR'] = runtestdir