Generate a report URL after running tests
PATCH 1/1 Generate a report URL after running tests
This patch makes xm-test spit out the URL to the user's on-line report for easier viewing of results.
# HG changeset patch
# User [email protected]
# Node ID 390770c67de8d42fe1e4b4ff84e3e54387e89fa6
# Parent bdcb115c667a12a5514517456639142c1273b0f1
Grab the test ID from the report submission response and provide a link to the user's test report
Signed-off-by Dan Smith <[email protected]>
tools/xm-test/lib/XmTestReport/Report.py +9 -2
@@ -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__":
Signature · 4 lines
Dan Smith IBM Linux Technology Center Open Hypervisor Team email: [email protected]
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Ewan Mellor
AppliedQuoted 2 lines · Dan Smith
This patch makes xm-test spit out the URL to the user's on-line report for easier viewing of results.
Applied, thank you.
Ewan.