Patchwork [3,of,5,STABLE] run-tests: rename "pure" variable to setup_opts

login
register
mail settings
Submitter Pierre-Yves David
Date March 6, 2020, 4:25 p.m.
Message ID <6223b41aac112b24a589.1583511923@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/45560/
State Superseded
Headers show

Comments

Pierre-Yves David - March 6, 2020, 4:25 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
# Branch stable
# Node ID 6223b41aac112b24a589316b6a733688709d932a
# Parent  a8944769d23b226e89162099ed3c18ea09b31126
# EXP-Topic rust-test-option
# Available At https://dev.heptapod.net/octobus/mercurial-devel/
#              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 6223b41aac11
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
@@ -3440,10 +3440,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])
@@ -3463,14 +3462,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,