[Pkg-debile-commits] [debile-slave] 14/28: Fix support of binary package testing

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:55:21 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch master
in repository debile-slave.

commit 4531be0e4ca14f3bb2f1d6307d7c9500a2b8851d
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Tue Aug 13 22:46:52 2013 +0200

    Fix support of binary package testing
---
 ethel/client.py           |    9 ++++-----
 ethel/commands/lintian.py |    8 +++-----
 ethel/daemon.py           |    1 +
 ethel/runners/lintian.py  |   17 ++++++++---------
 4 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/ethel/client.py b/ethel/client.py
index c93e569..78f87c3 100644
--- a/ethel/client.py
+++ b/ethel/client.py
@@ -34,13 +34,12 @@ def checkout(package):
         yield dsc
 
     def binary():
-        info = proxy.get_deb_info(package['binary_id'])
-        url_base = info['root']
-        out, err, ret = run_command(['wget'] + [
-            os.path.join(url_base, x) for x in info['packages']])
+        url = proxy.get_deb_info(package['binary_id'])
+        deb = os.path.basename(url)
+        out, err, ret = run_command(['wget', url])
         if ret != 0:
             raise Exception("zomgwtf")
-        yield package['binaries']
+        yield deb
 
     with tdir() as where:
         with cd(where):
diff --git a/ethel/commands/lintian.py b/ethel/commands/lintian.py
index 952c89c..f29375b 100644
--- a/ethel/commands/lintian.py
+++ b/ethel/commands/lintian.py
@@ -1,10 +1,8 @@
 from ethel.runners.lintian import lintian, version
 
-
-def run(dfiles, package, job, firehose):
-    if not isinstance(dfiles, list):
-        dfiles = [dfiles]
-    return lintian(dfiles, firehose, lintian_binary='lintian')
+# Can take either a .dsc or a .deb as target
+def run(target, package, job, firehose):
+    return lintian(target, firehose, lintian_binary='lintian')
 
 def get_version():
     return version(lintian_binary='lintian')
diff --git a/ethel/daemon.py b/ethel/daemon.py
index 05b08aa..da3f89d 100644
--- a/ethel/daemon.py
+++ b/ethel/daemon.py
@@ -36,6 +36,7 @@ def workon(suites, arches, capabilities):
             yield job
         except:
             logging.warn("Forfeiting the job because of internal exception")
+            print job
             proxy.forfeit_job(job['uuid'])
             raise
         else:
diff --git a/ethel/runners/lintian.py b/ethel/runners/lintian.py
index 8835e13..f36041c 100644
--- a/ethel/runners/lintian.py
+++ b/ethel/runners/lintian.py
@@ -3,18 +3,17 @@ from ethel.utils import run_command
 import os
 
 
-def lintian(packages, analysis, lintian_binary='lintian'):
+def lintian(target, analysis, lintian_binary='lintian'):
     log = ""
     failed = False
 
-    for package in packages:
-        out, err, ret = run_command([lintian_binary, "-IE", "--pedantic",
-                                     "--show-overrides", package])
-        for issue in parse_lintian(out.splitlines(), package):
-            analysis.results.append(issue)
-            if issue.severity in ['warning', 'error']:
-                failed = True
-        log += out
+    out, err, ret = run_command([lintian_binary, "-IE", "--pedantic",
+                                 "--show-overrides", target])
+    for issue in parse_lintian(out.splitlines(), target):
+        analysis.results.append(issue)
+        if issue.severity in ['warning', 'error']:
+            failed = True
+    log += out
 
     return (analysis, log, failed)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git



More information about the Pkg-debile-commits mailing list