[gnome-ostree] supybot: Also print out smoketest status on @buildstatus



commit 85d419834114ec89a861ecf59e322968abbbb05c
Author: Colin Walters <walters verbum org>
Date:   Thu Feb 28 09:08:03 2013 -0500

    supybot: Also print out smoketest status on @buildstatus

 qa/supybot/GNOMEOSTree/plugin.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/qa/supybot/GNOMEOSTree/plugin.py b/qa/supybot/GNOMEOSTree/plugin.py
index db82a08..7156b25 100644
--- a/qa/supybot/GNOMEOSTree/plugin.py
+++ b/qa/supybot/GNOMEOSTree/plugin.py
@@ -66,6 +66,8 @@ class GNOMEOSTree(callbacks.Plugin):
         current_build_path = os.path.join(self._workdir, 'tasks/build/current')
         meta_path = os.path.join(current_build_path, 'meta.json')
         if not os.path.exists(meta_path):
+            if status:
+                self._broadcast("No current build completed")
             return
         f = open(meta_path)
         build_meta = json.load(f)
@@ -107,6 +109,8 @@ class GNOMEOSTree(callbacks.Plugin):
         current_smoketest_path = os.path.join(self._workdir, 'tasks/smoketest/current')
         meta_path = os.path.join(current_build_path, 'meta.json')
         if not os.path.exists(meta_path):
+            if status:
+                self._broadcast("No current smoketest completed")
             return
 
         f = open(meta_path)
@@ -116,11 +120,14 @@ class GNOMEOSTree(callbacks.Plugin):
         taskver = smoketest_meta['taskVersion']
 
         version_unchanged = taskver == self._last_smoketest_version
-        if version_unchanged:
+        if (not status and version_unchanged):
             return
 
         self._last_smoketest_version = version
-        msg = "New smoketest"
+        if (not status and not version_unchanged):
+            msg = "New smoketest"
+        else:
+            msg = "Current smoketest"
         success = smoketest_meta['success']
         success_str = success and 'successful' or 'failed'
         msg += " %s: %s. " % (version, success_str)
@@ -135,5 +142,6 @@ class GNOMEOSTree(callbacks.Plugin):
 
     def buildstatus(self, irc, msg, args):
         self._query_new_build(status=True)
+        self._query_new_smoketest(status=True)
 
 Class = GNOMEOSTree


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]