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

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2020, 9:06 p.m.
Message ID <7788981b34f9a5ea17d5.1583701615@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/45618/
State Accepted
Headers show

Comments

Pierre-Yves David - March 8, 2020, 9:06 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 7788981b34f9a5ea17d57f2c7452f11cd8f0e3ef
# Parent  5736e8d4a0d8bdbecb8dfd0572233e47c27784f5
# EXP-Topic rust-test-option
# Available At https://dev.heptapod.net/octobus/mercurial-devel/
#              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 7788981b34f9
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,