[reprotest] 01/02: More tweaks:
Ximin Luo
infinity0 at debian.org
Fri Nov 18 20:16:58 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 679fbaa8e0394489c13781a803188b0c94a2f720
Author: Ximin Luo <infinity0 at debian.org>
Date: Fri Nov 18 21:16:14 2016 +0100
More tweaks:
- mention "auto" in --help
- fix preset_deb_schroot for .dsc files
- don't require "auto" files to be in the same directory as --source-root
---
reprotest/__init__.py | 7 +++++--
reprotest/presets.py | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index aa64ec4..923bad5 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -425,11 +425,13 @@ def check(build_command, artifact_pattern, virtual_server_args, source_root,
COMMAND_LINE_OPTIONS = types.MappingProxyType(collections.OrderedDict([
('build_command', types.MappingProxyType({
'default': None, 'nargs': '?', # 'type': str.split
- 'help': 'Build command to execute.'})),
+ 'help': 'Build command to execute, or "auto" to guess this.'})),
('artifact', types.MappingProxyType({
'default': None, 'nargs': '?',
'help': 'Build artifact to test for reproducibility. May be a shell '
- 'pattern such as "*.deb *.changes".'})),
+ 'pattern such as "*.deb *.changes". However, if you chose '
+ '"auto" as the build_command then this is not the artifact but '
+ 'instead the source to build, e.g. "." or some other path.'})),
('virtual_server_args', types.MappingProxyType({
'default': ["null"], 'nargs': '*',
'help': 'Arguments to pass to the virtual_server, the first argument '
@@ -602,6 +604,7 @@ def main():
testbed_init = command_line_options.get("testbed_init")
if build_command == 'auto':
+ source_root = os.path.dirname(artifact)
auto_preset_expr = command_line_options.get("auto_preset_expr")
values = presets.get_presets(artifact, virtual_server_args[0])
values = eval(auto_preset_expr, {'_':values}, {})
diff --git a/reprotest/presets.py b/reprotest/presets.py
index 1cad6c3..cf67693 100644
--- a/reprotest/presets.py
+++ b/reprotest/presets.py
@@ -64,8 +64,8 @@ PRESET_DEB_DIR = ReprotestPreset(
)
def preset_deb_schroot(preset):
- return preset.prepend.build_command(
- 'PATH=/sbin:/usr/sbin:$PATH apt-get -y --no-install-recommends build-dep ./; '
+ return preset.str_replace.build_command("dpkg-buildpackage",
+ 'PATH=/sbin:/usr/sbin:$PATH apt-get -y --no-install-recommends build-dep ./; dpkg-buildpackage'
).set.testbed_init(
'apt-get -y --no-install-recommends install util-linux disorderfs 2>/dev/null; \
test -c /dev/fuse || mknod -m 666 /dev/fuse c 10 229'
--
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