All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][XM-TEST] Generate a report URL after running tests
@ 2005-12-13 17:45 Dan Smith
  2005-12-13 18:02 ` Ewan Mellor
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Smith @ 2005-12-13 17:45 UTC (permalink / raw)
  To: Xen Developers

[-- Attachment #1: Type: text/plain, Size: 103 bytes --]

This patch makes xm-test spit out the URL to the user's on-line report
for easier viewing of results.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: reporturl.patch --]
[-- Type: text/x-patch, Size: 1738 bytes --]

# HG changeset patch
# User danms@us.ibm.com
# 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@us.ibm.com>

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__":

[-- Attachment #3: Type: text/plain, Size: 87 bytes --]

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com

[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][XM-TEST] Generate a report URL after running tests
  2005-12-13 17:45 [PATCH][XM-TEST] Generate a report URL after running tests Dan Smith
@ 2005-12-13 18:02 ` Ewan Mellor
  0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2005-12-13 18:02 UTC (permalink / raw)
  To: Dan Smith; +Cc: Xen Developers

On Tue, Dec 13, 2005 at 09:45:55AM -0800, Dan Smith wrote:

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-13 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-13 17:45 [PATCH][XM-TEST] Generate a report URL after running tests Dan Smith
2005-12-13 18:02 ` Ewan Mellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.