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

Mtest: if explicit --revision, don't make link to test file.
If --revision is given, Mtest is likely run on behalf of nightly
testing.  In that case, the link to the actual test is bogus, so we
don't generate it.  In all other cases, we do provide a link to the
file.
If the HG identity is known (whether through --revision or because we
figured it out ourselves), we do make a link to the repository.


diffs (46 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1896,9 +1896,12 @@ def RunTest(env, TST, BusyPorts, COND, o
                 f = '%s/%s%s.in' % (d, TST, EXT)
             else:
                 f = '%s/%s%s' % (d, TST, EXT)
-            hglink = ' (id <a href="%s">%s</a>)' % (f, REV)
+            if has_rev_opt:
+                titlefmt = '-tTest %s%s (id <a href="%s">%s</a>) (<a 
href="%s.%%s.diff.html">%%s</a>)' % (TST, EXT, f, REV, TST)
+            else:
+                titlefmt = '-tTest <a href="%s%s">%s%s</a> (id <a 
href="%s">%s</a>) (<a href="%s.%%s.diff.html">%%s</a>)' % (TST, EXT, TST, EXT, 
f, REV, TST)
         else:
-            hglink = ''
+            titlefmt = '-tTest <a href="%s%s">%s%s</a> (<a 
href="%s.%%s.diff.html">%%s</a>)' % (TST, EXT, TST, EXT, TST)
         diff_html = open('%s.out.diff.html' % TST,"w")
         diff_html.write('<!--MajorDiffs-->\n')
         diff_html.close()
@@ -1927,7 +1930,7 @@ def RunTest(env, TST, BusyPorts, COND, o
                 cmd.append('-q')
             cmd.extend(['-F^#', '-I%s' % par['IGNORE'],
                         '-C%s' % par['CONTEXT'], '-A%d' % ACCURACYout,
-                        '-tTest <a href="%s%s">%s%s</a>%s (<a 
href="%s.err.diff.html">err</a>)' % (TST, EXT, TST, EXT, hglink, TST),
+                        titlefmt % ('err', 'err'),
                         '%s%s.FILTERED' % (TST, STABLEout),
                         '%s.test.out.FILTERED' % TST,
                         '%s.out.diff.html' % TST])
@@ -1996,7 +1999,7 @@ def RunTest(env, TST, BusyPorts, COND, o
                 cmd.append('-q')
             cmd.extend(['-F^#', '-I%s' % par['IGNORE'],
                         '-C%s' % par['CONTEXT'], '-A%d' % ACCURACYerr,
-                        '-tTest <a href="%s%s">%s%s</a>%s (<a 
href="%s.out.diff.html">out</a>)' % (TST, EXT, TST, EXT, hglink, TST),
+                        titlefmt % ('out', 'out'),
                         '%s%s.FILTERED' % (TST, STABLEerr),
                         '%s.test.err.FILTERED' % TST,
                         '%s.err.diff.html' % TST])
@@ -3321,7 +3324,9 @@ def main(argv) :
 
     global REV
     global URLPREFIX
+    global has_rev_opt
     REV = opts.get('revision')
+    has_rev_opt = REV is not None
     if REV is None:             # no --revision option: try to find out
         try:
             proc = subprocess.Popen(['hg', 'id', '-i'], stdout = 
subprocess.PIPE)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to