WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Grab the test ID from the report submission response and

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Grab the test ID from the report submission response and provide a link
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Dec 2005 19:38:10 +0000
Delivery-date: Tue, 13 Dec 2005 19:40:12 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User danms@xxxxxxxxxx
# Node ID 89e0dfa3a089f14aa92f7ea04c94348185e5a634
# Parent  116b7c0a8534f1fee249267ccd4a69c62e61b376
Grab the test ID from the report submission response and provide a link
to the user's test report
Signed-off-by: Dan Smith <danms@xxxxxxxxxx>

diff -r 116b7c0a8534 -r 89e0dfa3a089 tools/xm-test/lib/XmTestReport/Report.py
--- a/tools/xm-test/lib/XmTestReport/Report.py  Tue Dec 13 16:26:33 2005
+++ b/tools/xm-test/lib/XmTestReport/Report.py  Tue Dec 13 18:00:50 2005
@@ -31,10 +31,12 @@
 import xml.dom.minidom
 import httplib
 import urllib
+import re
 
 #REPORT_HOST = "xmtest-dev.dague.org"
 REPORT_HOST = "xmtest.dague.org"
 REPORT_URL  = "/cgi-bin/report-results";
+VIEW_URL = "cgi-bin/display?view=single&testid="
 
 class XmTestReport:
 
@@ -101,16 +103,21 @@
     conn.request("POST", REPORT_URL, body, headers)
     
     resp = conn.getresponse()
+    data = resp.read()
+
     if resp.status == 200:
         print >>sys.stderr, "Your results have been submitted successfully!"
+        match = re.match("^id=([0-9]+)$", data.split("\n")[1])
+        if match:
+            id = match.group(1)
+            print >>sys.stderr, "See your report at:"
+            print >>sys.stderr, "http://%s/%s%s"; % (REPORT_HOST, VIEW_URL, id)
     else:
         print >>sys.stderr, "Unable to submit results:"
         print >>sys.stderr, "[http://%s%s] said %i: %s" % (REPORT_HOST,
                                                            REPORT_URL,
                                                            resp.status,
                                                            resp.reason)
-
-        data = resp.read()
         print >>sys.stderr, data
 
 if __name__ == "__main__":

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Grab the test ID from the report submission response and provide a link, Xen patchbot -unstable <=