[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH][XM-TEST] 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 danms@xxxxxxxxxx # 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 <danms@xxxxxxxxxx> diff -r bdcb115c667a -r 390770c67de8 tools/xm-test/lib/XmTestReport/Report.py --- a/tools/xm-test/lib/XmTestReport/Report.py Sat Dec 10 23:20:08 2005 +++ b/tools/xm-test/lib/XmTestReport/Report.py Mon Dec 12 17:31:25 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__": -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@xxxxxxxxxx _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |