[reprotest] 01/03: Remove unimplemented variations from README; rename some variations
Ximin Luo
infinity0 at debian.org
Tue Jan 24 15:42:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit 22a3a8b8a2a9aaabcb764a0c1a47d1b8970665a8
Author: Ximin Luo <infinity0 at debian.org>
Date: Sat Jan 7 17:54:56 2017 +0100
Remove unimplemented variations from README; rename some variations
---
README.md | 8 ++------
debian/changelog | 4 ++++
reprotest/__init__.py | 6 +++---
tests/mock_build.py | 2 +-
tests/tests.py | 3 ++-
5 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 7824bd7..d67d1c9 100644
--- a/README.md
+++ b/README.md
@@ -105,18 +105,14 @@ directory. A sample config file is below.
source_root = reprotest/
variations =
environment
- domain_host
- filesystem
+ build_path
home
- host
kernel
locales
- path
- shell
+ exec_path
time
timezone
umask
- user_group
diff --git a/debian/changelog b/debian/changelog
index 063b9b0..d2db331 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ reprotest (0.6) UNRELEASED; urgency=medium
* When a reproduction succeeds, only output hashes of the artifacts rather
than everything in the current directory.
+ * Remove unimplemented variations from README.
+ * Rename some variations:
+ path -> exec_path, to distinguish it from build_path
+ faketime -> time, since users care about interface not implementation
-- Ximin Luo <infinity0 at debian.org> Sat, 07 Jan 2017 17:15:42 +0100
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index db3e254..b3bfdb6 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -291,7 +291,7 @@ def locales(script, env, tree, *args):
# # command2 = ['unshare', '--uts'] + command2
# return script, env, tree
-def path(script, env, tree, *args):
+def exec_path(script, env, tree, *args):
new_env = add(env.experiment, 'PATH', env.control['PATH'] +
':/i_capture_the_path')
return script, Pair(env.control, new_env), tree
@@ -353,10 +353,10 @@ VARIATIONS = types.MappingProxyType(collections.OrderedDict([
('kernel', kernel),
('locales', locales),
# ('namespace', namespace),
- ('path', path),
+ ('exec_path', exec_path),
# ('shell', shell),
+ ('time', faketime),
('timezone', timezone),
- ('faketime', faketime),
('umask', umask),
# ('user_group', user_group),
]))
diff --git a/tests/mock_build.py b/tests/mock_build.py
index 06538ac..68ebbd9 100755
--- a/tests/mock_build.py
+++ b/tests/mock_build.py
@@ -41,7 +41,7 @@ if __name__ == '__main__':
if 'locales' in captures:
output.extend(l.encode('ascii') if l else b'(None)' for l in locale.getlocale())
output.append(subprocess.check_output(['locale']))
- if 'path' in captures:
+ if 'exec_path' in captures:
output.extend(p.encode('ascii') for p in os.get_exec_path())
if 'timezone' in captures:
output.append(str(time.timezone).encode('ascii'))
diff --git a/tests/tests.py b/tests/tests.py
index fb6290e..e0f4070 100755
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -44,7 +44,8 @@ def test_simple_builds(virtual_server):
check_return_code('python3 mock_failure.py', virtual_server, 2)
check_return_code('python3 mock_build.py irreproducible', virtual_server, 1)
- at pytest.mark.parametrize('captures', ['fileordering', 'home', 'kernel', 'locales', 'path', 'timezone', 'umask'])
+# TODO: test all variations that we support
+ at pytest.mark.parametrize('captures', ['fileordering', 'home', 'kernel', 'locales', 'exec_path', 'timezone', 'umask'])
def test_variations(virtual_server, captures):
expected = 1 if captures in TEST_VARIATIONS else 0
check_return_code('python3 mock_build.py ' + captures, virtual_server, expected)
--
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