[reprotest] 01/01: Set uname to two explicitly different values

Ximin Luo infinity0 at debian.org
Fri Nov 18 19:43:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository reprotest.

commit f74033652137e3c68e5cea948a0a014a9c2e1a97
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Nov 18 20:42:48 2016 +0100

    Set uname to two explicitly different values
    
    Otherwise, when reprotest is reprotesting itself, then one of the builds will
    fail its tests, because its two child reprotests will see the same value for
    "uname" but the tests expect different values.
---
 reprotest/__init__.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 4437a43..aa64ec4 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -222,14 +222,15 @@ def home(script, env, tree, testbed):
 # https://en.wikipedia.org/wiki/Uname
 @_contextlib.contextmanager
 def kernel(script, env, tree, testbed):
+    # set these two explicitly different. otherwise, when reprotest is
+    # reprotesting itself, then one of the builds will fail its tests, because
+    # its two child reprotests will see the same value for "uname" but the
+    # tests expect different values.
     setarch = _shell_ast.SimpleCommand.make('linux64', '--uname-2.6')
-    # setarch = _shell_ast.SimpleCommand(
-    #     '', 'linux64', _shell_ast.CmdSuffix(
-    #         ['--uname-2.6', script.experiment[0].command]))
-    # new_script = (script.experiment[:-1] +
-    #               _shell_ast.List([_shell_ast.Term(setarch, ';')]))
-    new_script = script.experiment.append_command(setarch)
-    yield Pair(script.control, new_script), env, tree
+    setarch2 = _shell_ast.SimpleCommand.make('linux32')
+    new_control = script.control.append_command(setarch)
+    new_experiment = script.experiment.append_command(setarch2)
+    yield Pair(new_control, new_experiment), env, tree
 
 # TODO: if this locale doesn't exist on the system, Python's
 # locales.getlocale() will return (None, None) rather than this

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git



More information about the Reproducible-commits mailing list