[Pkg-debile-commits] [debile-slave] 04/28: Added support for failed flag

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:55:19 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 72ac04f1fa8104eb8ccbd0830c7d4dbc49bdc729
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Thu Aug 8 16:35:06 2013 +0200

    Added support for failed flag
---
 ethel/daemon.py                |   22 +++++++++++++++-------
 ethel/runners/clanganalyzer.py |    1 -
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/ethel/daemon.py b/ethel/daemon.py
index b5f3537..dfbeaf3 100644
--- a/ethel/daemon.py
+++ b/ethel/daemon.py
@@ -9,6 +9,7 @@ from ethel.config import Config
 
 import logging
 import time
+import shutil
 
 config = Config()
 proxy = get_proxy()
@@ -38,7 +39,7 @@ def workon(suites, arches, capabilities):
             raise
         else:
             logging.info("Successfully closing the job")
-            proxy.close_job(job['id'])
+            proxy.close_job(job['id'], job['failed'])
 
 
 def generate_sut_from_source(package):
@@ -95,7 +96,7 @@ def iterate():
         with tdir() as fd:
             with cd(fd):
                 with checkout(package) as target:
-                    firehose, log, ERRHACK = handler(target, package,
+                    firehose, log, failed = handler(target, package,
                                                  job, firehose)
 
                     logging.info("Job worker returned, filing reports")
@@ -109,12 +110,19 @@ def iterate():
                                                 dest=remote_firehose_path)
                     out, err, ret = run_command(cmd)
                     ### SCANDALOUS HACK
+                    ### failed contains potential scan-build repord directory list
                     if job['type'] == 'clanganalyzer':
-                        logging.info("SCANDALOUS HACK sending scan-build HTML reports")
-                        remote_path = proxy.get_scanbuildhtml_write_location(job['uuid'])
-                        cmd = config.get('lucy', 'copy').format(src=ERRHACK,
-                                                    dest=remote_path)
-                        out, err, ret = run_command(cmd)
+                        if len(failed) == 0:
+                            job['failed'] = False
+                        else:
+                            job['failed'] = True
+                            logging.info("SCANDALOUS HACK sending scan-build HTML reports")
+                            remote_path = proxy.get_scanbuildhtml_write_location(job['uuid'])
+                            cmd = config.get('lucy', 'copy').format(src=failed[0],
+                                                        dest=remote_path)
+                            out, err, ret = run_command(cmd)
+                            shutil.rmtree(failed[0])
+
                     logging.info("Sending the logs to the pool")
                     remote_path = proxy.get_log_write_location(job['uuid'])
                     open('ethel-log', 'wb').write(log.encode('utf-8'))
diff --git a/ethel/runners/clanganalyzer.py b/ethel/runners/clanganalyzer.py
index a3cc7aa..1d9d3dd 100644
--- a/ethel/runners/clanganalyzer.py
+++ b/ethel/runners/clanganalyzer.py
@@ -72,7 +72,6 @@ def clanganalyzer(package, suite, arch, analysis):
         # worst, if we run several instances of virtual builders, this will fail because
         # by default /tmp is a bind mount from the physical server
         reports_dir = glob.glob(internal_report_dir+'*')
-        print reports_dir
 
         ### SCANDALOUS HACK !!
         return analysis, out, reports_dir

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