[reprotest] 02/02: main: allow the user to select a different diffoscope
Ximin Luo
infinity0 at debian.org
Sat Dec 2 15:59:24 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 6de8df5fa839f94a82ac99e19b28f8f7c6932416
Author: Ximin Luo <infinity0 at debian.org>
Date: Sat Dec 2 16:58:29 2017 +0100
main: allow the user to select a different diffoscope
---
reprotest/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index e80a40f..b729ded 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -242,8 +242,8 @@ def run_diff(dist_0, dist_1, diffoscope_args, store_dir):
logger.info("Running diff: %r", diffprogram)
output = '%s.diff' % name
else:
- diffprogram = (['diffoscope', dist_0, dist_1] +
- [a.format(name, dist_1) for a in diffoscope_args])
+ diffprogram = ([a.format(name, dist_1) for a in diffoscope_args]
+ + [dist_0, dist_1])
logger.info("Running diffoscope: %r", diffprogram)
output = '%s.diffoscope.out' % name
@@ -599,6 +599,8 @@ def cli_parser():
'%(default)s. Arguments are {}-formatted with: {0} the name of each '
'experiment run, and {1} the path of the experiment output.',
default=['--exclude-directory-metadata'])
+ group2.add_argument('--diffoscope', default='diffoscope', metavar='PATH',
+ help='Path to diffoscope(1). Default: %(default)s')
group2.add_argument('--no-diffoscope', action='store_true', default=False,
help='Don\'t run diffoscope; instead run diff(1). Useful if you '
'don\'t want to install diffoscope and/or just want a quick answer '
@@ -807,8 +809,11 @@ def run(argv, dry_run=None):
host_distro = parsed_args.host_distro
store_dir = parsed_args.store_dir
no_clean_on_error = parsed_args.no_clean_on_error
+ diffoscope = parsed_args.diffoscope
if parsed_args.no_diffoscope:
diffoscope_args = None
+ else:
+ diffoscope_args = [diffoscope] + diffoscope_args
if not artifact_pattern:
print("No <artifact> to test for differences provided. See --help for options.")
--
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