All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Smith <danms@us.ibm.com>
To: Xen Developers <xen-devel@lists.xensource.com>
Subject: [PATCH][XM-TEST] Generate a report URL after running tests
Date: Tue, 13 Dec 2005 09:45:55 -0800	[thread overview]
Message-ID: <871x0goppo.fsf@theine.beaverton.ibm.com> (raw)

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

             reply	other threads:[~2005-12-13 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 17:45 Dan Smith [this message]
2005-12-13 18:02 ` [PATCH][XM-TEST] Generate a report URL after running tests Ewan Mellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871x0goppo.fsf@theine.beaverton.ibm.com \
    --to=danms@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.