Patchwork [4,of,6,v3] run-tests: rename "pure" variable to setup_opts

login
register
mail settings
Submitter Pierre-Yves David
Date March 9, 2020, 5:34 p.m.
Message ID <7653a195e622714c5c2f.1583775295@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/45637/
State Accepted
Headers show

Comments

Pierre-Yves David - March 9, 2020, 5:34 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1583508290 -3600
#      Fri Mar 06 16:24:50 2020 +0100
# Node ID 7653a195e622714c5c2fc9232941d1bb224273aa
# Parent  4094a983cfe6f59ddbec04c34a0070137911d6fa
# EXP-Topic rust-test-option
# Available At https://dev.heptapod.net/octobus/mercurial-devel/
#              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 7653a195e622
run-tests: rename "pure" variable to setup_opts

There are more useful flag than just `--pure`. We clarify the variable name
before adding more options.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -3428,10 +3428,9 @@  class TestRunner(object):
         compiler = ''
         if self.options.compiler:
             compiler = '--compiler ' + self.options.compiler
+        setup_opts = b""
         if self.options.pure:
-            pure = b"--pure"
-        else:
-            pure = b""
+            setup_opts = b"--pure"
 
         # Run installer in hg root
         script = os.path.realpath(sys.argv[0])
@@ -3451,14 +3450,14 @@  class TestRunner(object):
             # when they happen.
             nohome = b''
         cmd = (
-            b'"%(exe)s" setup.py %(pure)s clean --all'
+            b'"%(exe)s" setup.py %(setup_opts)s clean --all'
             b' build %(compiler)s --build-base="%(base)s"'
             b' install --force --prefix="%(prefix)s"'
             b' --install-lib="%(libdir)s"'
             b' --install-scripts="%(bindir)s" %(nohome)s >%(logfile)s 2>&1'
             % {
                 b'exe': exe,
-                b'pure': pure,
+                b'setup_opts': setup_opts,
                 b'compiler': compiler,
                 b'base': os.path.join(self._hgtmp, b"build"),
                 b'prefix': self._installdir,