[pypy-svn] r78994 - pypy/build/bot2/pypybuildbot

arigo at codespeak.net arigo at codespeak.net
Thu Nov 11 11:40:40 CET 2010


Author: arigo
Date: Thu Nov 11 11:40:39 2010
New Revision: 78994

Modified:
   pypy/build/bot2/pypybuildbot/master.py
   pypy/build/bot2/pypybuildbot/summary.py
Log:
Allow category prefixes too.


Modified: pypy/build/bot2/pypybuildbot/master.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/master.py	(original)
+++ pypy/build/bot2/pypybuildbot/master.py	Thu Nov 11 11:40:39 2010
@@ -86,7 +86,10 @@
 
 # pypy test summary page
 summary = load('pypybuildbot.summary')
-status.putChild('summary', summary.Summary(['linux', 'mac', 'win', 'freebsd']))
+status.putChild('summary', summary.Summary(categories=['linux',
+                                                       'mac',
+                                                       'win',
+                                                       'freebsd']))
 status.putChild('nightly', PyPyList(os.path.expanduser('~/nightly'),
                                     defaultType='application/octet-stream'))
 

Modified: pypy/build/bot2/pypybuildbot/summary.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/summary.py	(original)
+++ pypy/build/bot2/pypybuildbot/summary.py	Thu Nov 11 11:40:39 2010
@@ -771,12 +771,12 @@
                     break
             else:
                 branch_key = (len(self.branch_order_prefixes)+1, branch)
-        try:
-            i = self.categories.index(category)
-            cat_key =  (0, i)
-        except ValueError:
-            cat_key = (1, category)
-
+        for i, catprefix in enumerate(self.categories):
+            if category.startswith(catprefix):
+                break
+        else:
+            i = len(self.categories)
+        cat_key = (i, category)
         return cat_key + branch_key
                             
     def body(self, request):



More information about the Pypy-commit mailing list