aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-10-12 10:24:35 +0200
committerGuido Günther <agx@sigxcpu.org>2020-10-12 10:25:32 +0200
commit657b005c5d07f7e53ce8be417961d67f71a1f07e (patch)
tree3f3c16d3b106406403657a8dde4531d2410a3602
parentd9e473408e17cb267123e62f6f8b0326fafe2f9a (diff)
buildpackage: Fix tests and test arch override
-rwxr-xr-xgbp/scripts/buildpackage.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index dc86592..8c489bf 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -289,16 +289,18 @@ def disable_hooks(options):
def changes_file_suffix(builder, dpkg_args, arch):
"""
- >>> changes_file_suffix('debuild', ['-A'])
+ >>> changes_file_suffix('debuild', ['-A'], '')
'all'
- >>> changes_file_suffix('debuild', ['-S'])
+ >>> changes_file_suffix('debuild', ['-S'], '')
'source'
- >>> changes_file_suffix('debuild -A', ['-uc', '-us'])
+ >>> changes_file_suffix('debuild -A', ['-uc', '-us'], '')
'all'
- >>> changes_file_suffix('debuild -S', ['-uc', '-us'])
+ >>> changes_file_suffix('debuild -S', ['-uc', '-us'], '')
'source'
- >>> changes_file_suffix('debuild', []) == du.get_arch()
+ >>> changes_file_suffix('debuild', [], '') == du.get_arch()
True
+ >>> changes_file_suffix('debuild', [], 'arm64')
+ 'arm64'
"""
args = shlex.split(builder) + dpkg_args
if '-S' in args:
@@ -514,7 +516,8 @@ def main(argv):
else source.upstream_version)
export_dir = os.path.join(output_dir, "%s-%s" % (source.sourcepkg, major))
build_dir = export_dir if options.export_dir else repo.path
- changes_file = changes_file_name(source, build_dir, options.builder, dpkg_args, options.pbuilder_arch)
+ changes_file = changes_file_name(source, build_dir, options.builder, dpkg_args,
+ options.pbuilder_arch)
# Run preexport hook
if options.export_dir and options.preexport: