[Pkg-debile-commits] [debile-slave] 01/28: Hack to get scan-build html reports

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:55:18 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 7c23704aec1a2ae458f3a25ebb14bb0a9616056b
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Tue Aug 6 15:07:26 2013 +0200

    Hack to get scan-build html reports
---
 ethel/daemon.py                |   12 +++++++++---
 ethel/runners/clanganalyzer.py |   13 +++----------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/ethel/daemon.py b/ethel/daemon.py
index a73fcac..cac2e28 100644
--- a/ethel/daemon.py
+++ b/ethel/daemon.py
@@ -29,7 +29,7 @@ def workon(suites, arches, capabilities):
     if job is None:
         yield
     else:
-        logging.info("Acquired job id=%s (%s) for %s/%s", job['id'], job['type'], job['suite'], job['arch'])
+        logging.info("Acquired job uuid=%s (%s) for %s/%s", job['uuid'], job['type'], job['suite'], job['arch'])
         try:
             yield job
         except:
@@ -104,13 +104,19 @@ def iterate():
 
                     logging.info("Sending the XML firehose report to the pool")
                     open('firehose.xml', 'w').write(firehose.to_xml_bytes())
-                    remote_firehose_path = proxy.get_firehose_write_location(job['id'])
+                    remote_firehose_path = proxy.get_firehose_write_location(job['uuid'])
                     cmd = config.get('lucy', 'copy').format(src='firehose.xml',
                                                 dest=remote_firehose_path)
                     out, err, ret = run_command(cmd)
+                    ### SCANDALOUS HACK
+                    if job['type'] == 'clanganalyzer':
+                        remote_path = proxy.get_scanbuildhtml_write_location(job['uuid'])
+                        cmd = config.get('lucy', 'copy').format(src=out,
+                                                    dest=remote_path)
+                        out, err, ret = run_command(cmd)
 
                     logging.info("Sending the logs to the pool")
-                    remote_path = proxy.get_log_write_location(job['id'])
+                    remote_path = proxy.get_log_write_location(job['uuid'])
                     open('ethel-log', 'wb').write(log.encode('utf-8'))
                     cmd = config.get('lucy', 'copy').format(src='ethel-log',
                                                 dest=remote_path)
diff --git a/ethel/runners/clanganalyzer.py b/ethel/runners/clanganalyzer.py
index 28aaa0f..f471316 100644
--- a/ethel/runners/clanganalyzer.py
+++ b/ethel/runners/clanganalyzer.py
@@ -40,7 +40,7 @@ def clanganalyzer(package, suite, arch, analysis):
         out += out_
 
         # Create the script
-        fake_dpkg_url = "http://leo.cavaille.net/public/dpkg-buildpackage"
+        fake_dpkg_url = "http://leo.cavaille.net/public/dpkg-buildpackage-html"
         out_, err, ret = chroot.run([
             'wget', '-O', '/usr/bin/dpkg-buildpackage', fake_dpkg_url
         ], user='root')
@@ -73,15 +73,8 @@ def clanganalyzer(package, suite, arch, analysis):
         # by default /tmp is a bind mount from the physical server
         reports_dir = glob.glob(internal_report_dir+'*')
 
-        # If the result is empty then scan-build returned nothing because no directory
-        # was created
-        if reports_dir:
-            for reports in parse_scandir(reports_dir[0]):
-                for issue in reports:
-                    analysis.results.append(issue)
-            shutil.rmtree(reports_dir[0])
-
-        return analysis, out, failed
+        ### SCANDALOUS HACK !!
+        return analysis, reports_dir, failed
 
 
 def version():

-- 
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