# 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
|