[Piuparts-commits] [piuparts] 06/06: piuparts-report.py: Default summary dist support

Holger Levsen holger at moszumanska.debian.org
Wed Apr 30 10:24:46 UTC 2014


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

holger pushed a commit to branch develop
in repository piuparts.

commit b8096c51c66e7c97bf5aaed8014684522ffc8239
Author: David Steele <dsteele at gmail.com>
Date:   Sun Mar 9 21:34:13 2014 -0400

    piuparts-report.py: Default summary dist support
    
    If reporting-sections is 'default', use conf.get_std_distro() to
    determine which distribution to assign the results to. If
    reporting-sections is 'none', don't make the section summary.
---
 README_server.txt  | 12 +++++++-----
 piuparts-report.py |  9 +++++++--
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/README_server.txt b/README_server.txt
index 27d0509..3f3b077 100644
--- a/README_server.txt
+++ b/README_server.txt
@@ -507,13 +507,15 @@ section, too, and will serve as defaults for all other sections
  rescheduling one of passed or failed logs, set the corresponding
  -count variable to zero.
 
-* "reporting-sections" is a space separated list of the
+* "reporting-sections" is a space-separated list of the
  section/distribution names which receive test results for this
  section. The results, by package, are stored with this name/these
- names in the section and global test summary files. The names
- "unstable", "testing", "stable", "oldstable", and "experimental"
- have special meaning. The reporting-section name "overall' is
- reserved.
+ names in the section and global test summary.json files. If
+ "reporting-sections" is undefined, or defined as "default", piuparts
+ will assign the section to one of "unstable", "testing", "stable",
+ "oldstable", "experimental", or "unknown". If "reporting-sections"
+ is "none", the summary will not be created. The "reporting-sections"
+ name "overall" is reserved.
 
 Some of the configuration items are not required, but it is best
 to set them all to be sure what the configuration actually is.
diff --git a/piuparts-report.py b/piuparts-report.py
index 8b1b858..94e7142 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -496,7 +496,7 @@ class Config(piupartslib.conf.Config):
                 "max-reserved": 1,
                 "doc-root": "/",
                 "known-problem-directory": "@sharedir@/piuparts/known_problems",
-                "reporting-sections": "",
+                "reporting-sections": "default",
                 "precedence": 1,
                 "master-host": "piuparts.debian.org",
             },
@@ -1466,7 +1466,12 @@ class Section:
             os.unlink(summary_path)
 
         reporting_sections = self._config['reporting-sections'].split()
-        if reporting_sections:
+        if not reporting_sections or reporting_sections[0] == 'default':
+            reporting_sections = [self._config.get_std_distro()]
+
+        if reporting_sections[0] == 'none':
+            logging.debug("Skipping summary")
+        else:
             logging.debug("Generating summary")
 
             summary = pkgsummary.new_summary()

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



More information about the Piuparts-commits mailing list