On Thu, 2009-12-03 at 15:19 +0100, Kamil Páral wrote:
When running 'autoqa post-koji-update -l --local' on x86_64
architecture
the rpmlint test was not listed because of a hack in post-koji-update
hook. This patch fixes this issue.
Ah yes, I see where opts.arch is relied on by several of the watchers.
Good catch.
Thanks,
James
---
autoqa | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/autoqa b/autoqa
index 9eae158..18ee828 100755
--- a/autoqa
+++ b/autoqa
@@ -155,6 +155,14 @@ hook.extend_parser(parser)
# And now we really parse the commandline.
(opts, args) = parser.parse_args()
args.pop(0) # dump hookname
+
+# Run the tests locally, or schedule them through autotest?
+run_local = (opts.local or (conf['local'].lower() == 'true'))
+
+# Determine list of architectures
+if run_local:
+ opts.arch = [os.uname()[4]] # not really important that we get this right
+
# Get the initial testlist
# TODO try/except
testlist = []
@@ -164,8 +172,6 @@ testlist_file.close()
controlfiles = [os.path.join(conf['testdir'], t, 'control') for t in
testlist]
# Use the hook-specific code to filter the testlist
testlist = hook.process_testlist(opts, args, testlist)
-# Run the tests locally, or schedule them through autotest?
-run_local = (opts.local or (conf['local'].lower() == 'true'))
# Allow user overrides
if opts.test:
for t in opts.test:
@@ -183,13 +189,9 @@ if not args:
if not (opts.arch or run_local):
parser.error('No arch specified')
-if run_local:
- archlist = [os.uname()[4]] # not really important that we get this right
-else:
- archlist = opts.arch
# We're ready to run/queue tests now.
-for arch in archlist:
+for arch in opts.arch:
# N.B. process_testdata may grow new keyword arguments if we add new autoqa
# args that add another loop here..
testdata = hook.process_testdata(opts, args, arch=arch)