Changeset: 31012bb5ee91 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=31012bb5ee91
Modified Files:
        testing/Mtest.py.in
Branch: Dec2011
Log Message:

testing: Add a link to the bug tracker when appropriate.
If tests are named correctly using the scheme Bug-<n> in the name, we
now create a link to the bugzilla entry.
Old SF-<n> bugs are also recognized.


diffs (28 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -654,6 +654,8 @@ def CreateHtmlIndex (env, *body) :
         os.chdir(BACK)
 ### CreateHtmlIndex (env, *body) #
 
+bugre = re.compile(r'\.(sf|bug)-(?P<bugno>[1-9]\d+)', re.I)
+
 def CreateTstWhatXhtml (env, TST, stableWHAT, EXT, result) :
     WHAT = stableWHAT[7:11]
     TSTDIR    = env['TSTDIR']
@@ -797,6 +799,15 @@ def CreateTstWhatXhtml (env, TST, stable
                           'target': target},
                     Text('src')),
             Text(')')])
+    res = bugre.search(TST)
+    if res is not None:
+        bugno = res.group('bugno')
+        text.addchildren([
+                Text(' ('),
+                Element('a', {'href': 'http://bugs.monetdb.org/%s' % bugno,
+                              'target': '_blank'},
+                        Text('Bugzilla')),
+                Text(')')])
     html = Element('html', {},
                    Element('head', {},
                            Element('title', {},
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to