[Reproducible-commits] [reprotest] 01/03: Clean up some variations
Ceridwen
ceridwen-guest at moszumanska.debian.org
Thu Jun 9 14:18:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
ceridwen-guest pushed a commit to branch master
in repository reprotest.
commit 41a19be8442e68ca95776ea309dfe8c97570caaf
Author: Ceridwen <ceridwenv at gmail.com>
Date: Wed Jun 8 16:38:00 2016 -0400
Clean up some variations
---
reprotest/__init__.py | 19 ++++++++-----------
tests/build.py | 2 --
tests/test.py | 3 ---
3 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 05abdc0..f7cf4a5 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -96,15 +96,10 @@ def path(command1, command2, env1, env2, tree1, tree2):
env2['PATH'] = env1['PATH'] + '/i_capture_the_path'
yield command1, command2, env1, env2, tree1, tree2
+# This doesn't require superuser privileges, but the chsh command
+# affects all user shells, which would be bad.
@contextlib.contextmanager
def shell(command1, command2, env1, env2, tree1, tree2):
- # Probably try linking the shell.
- yield command1, command2, env1, env2, tree1, tree2
-
-# TODO: when building on an existing system, it's almost certain time
-# will be tested.
- at contextlib.contextmanager
-def time(command1, command2, env1, env2, tree1, tree2):
yield command1, command2, env1, env2, tree1, tree2
@contextlib.contextmanager
@@ -194,15 +189,17 @@ def main():
arg_parser.add_argument(
'artifact', help='Build artifact to test for reproducibility.')
# Reprotest will copy this tree and then run the build command.
- arg_parser.add_argument('--source_root', type=pathlib.Path,
- help='Root of the source tree, if not the '
- 'current working directory.')
+ arg_parser.add_argument(
+ '--source-root', dest='--source_root', type=pathlib.Path,
+ help='Root of the source tree, if not the '
+ 'current working directory.')
arg_parser.add_argument(
'--variations', type=lambda s: frozenset(s.split(',')),
help='Build variations to test as a comma-separated list'
' (without spaces). Default is to test all available variations.')
arg_parser.add_argument(
- '--dont_vary', type=lambda s: frozenset(s.split(',')),
+ '--dont-vary', dest='--dont_vary',
+ type=lambda s: frozenset(s.split(',')),
help='Build variations *not* to test as a comma-separated'
' list (without spaces). Default is to test all available variations.')
# Argparse exits with status code 2 if something goes wrong, which
diff --git a/tests/build.py b/tests/build.py
index e9d093f..3e4f738 100755
--- a/tests/build.py
+++ b/tests/build.py
@@ -28,8 +28,6 @@ if __name__ == '__main__':
output.extend(l.encode('ascii') for l in locale.getlocale())
if 'path' in args:
output.extend(p.encode('ascii') for p in os.get_exec_path())
- if 'time' in args:
- output.append(time.asctime(time.gmtime()).encode('ascii'))
if 'timezone' in args:
output.append(str(time.timezone).encode('ascii'))
with open('artifact', 'wb') as artifact:
diff --git a/tests/test.py b/tests/test.py
index b4cb373..1d775a1 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -19,7 +19,4 @@ if __name__ == '__main__':
test_return_code(['python', 'build.py', 'kernel'], 1)
test_return_code(['python', 'build.py', 'locales'], 1)
test_return_code(['python', 'build.py', 'path'], 1)
- # This test relies on this script being fast enough so that a
- # second doesn't elapse between one build and another build.
- test_return_code(['python', 'build.py', 'time'], 0)
test_return_code(['python', 'build.py', 'timezone'], 1)
--
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