summaryrefslogtreecommitdiff
path: root/scripts/LocalDriver.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-07-11 11:39:29 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-07-11 11:39:29 +0200
commit9cb65142b7ce6fdf3a8ad6458ef78ba2b8f3a1a9 (patch)
tree6deaf4d4580d64bfb3468a1cb231227df28d8d11 /scripts/LocalDriver.py
parentAdded JUnit XML reports to allTests.py (diff)
downloadice-9cb65142b7ce6fdf3a8ad6458ef78ba2b8f3a1a9.tar.bz2
ice-9cb65142b7ce6fdf3a8ad6458ef78ba2b8f3a1a9.tar.xz
ice-9cb65142b7ce6fdf3a8ad6458ef78ba2b8f3a1a9.zip
Revert "Added JUnit XML reports to allTests.py"
This reverts commit 2d8b44932779f887ce47c43e25dbda72b817e45d.
Diffstat (limited to 'scripts/LocalDriver.py')
-rw-r--r--scripts/LocalDriver.py37
1 files changed, 6 insertions, 31 deletions
diff --git a/scripts/LocalDriver.py b/scripts/LocalDriver.py
index 5a839622c3f..af6efbd2739 100644
--- a/scripts/LocalDriver.py
+++ b/scripts/LocalDriver.py
@@ -301,23 +301,6 @@ class RemoteTestCaseRunner(TestCaseRunner):
current.config.cprops,
current.config.sprops)
-class XmlExporter:
-
- def __init__(self, results, duration, failures):
- self.results = results
- self.duration = duration
- self.failures = failures
-
- def save(self, filename, hostname):
- with open(filename, "w") as out:
- out.write('<?xml version="1.1" encoding="UTF-8"?>\n')
- out.write('<testsuites tests="{0}" failures="{1}" time="{2}">\n'.format(len(self.results),
- self.duration,
- len(self.failures)))
- for r in self.results:
- r.writeAsXml(out, hostname)
- out.write('</testsuites>\n')
-
class LocalDriver(Driver):
class Current(Driver.Current):
@@ -330,7 +313,7 @@ class LocalDriver(Driver):
@classmethod
def getSupportedArgs(self):
return ("", ["cross=", "workers=", "continue", "loop", "start=", "all", "all-cross", "host=",
- "client=", "server=", "show-durations", "export-xml="])
+ "client=", "server=", "show-durations"])
@classmethod
def usage(self):
@@ -346,7 +329,6 @@ class LocalDriver(Driver):
print("--client=<proxy> The endpoint of the controller to run the client side.")
print("--server=<proxy> The endpoint of the controller to run the server side.")
print("--show-durations Print out the duration of each tests.")
- print("--export-xml=<file> Export JUnit XML test report.")
def __init__(self, options, *args, **kargs):
Driver.__init__(self, options, *args, **kargs)
@@ -359,7 +341,6 @@ class LocalDriver(Driver):
self.start = 0
self.all = False
self.showDurations = False
- self.exportToXml = ""
self.clientCtlPrx = ""
self.serverCtlPrx = ""
@@ -369,8 +350,7 @@ class LocalDriver(Driver):
"all-cross" : "allCross",
"client" : "clientCtlPrx",
"server" : "serverCtlPrx",
- "show-durations" : "showDurations",
- "export-xml" : "exportToXml" })
+ "show-durations" : "showDurations" })
if self.cross:
self.cross = Mapping.getByName(self.cross)
@@ -429,12 +409,7 @@ class LocalDriver(Driver):
Expect.cleanup() # Cleanup processes which might still be around
failures = [r for r in results if not r.isSuccess()]
- duration = time.time() - now
-
- if self.exportToXml:
- XmlExporter(results, duration, failures).save(self.exportToXml, os.getenv("NODE_NAME", ""))
-
- m, s = divmod(duration, 60)
+ m, s = divmod(time.time() - now, 60)
print("")
if m > 0:
print("Ran {0} tests in {1} minutes {2:02.2f} seconds".format(len(results), m, s))
@@ -530,7 +505,7 @@ class LocalDriver(Driver):
if cross and server.getMapping() != cross:
if not self.allCross:
- current.result.skipped(self.testcase, "no server available for `{0}' mapping".format(cross))
+ current.writeln("skipped, no server available for `{0}' mapping".format(cross))
continue
current.writeln("[ running {0} test - {1} ]".format(current.testcase, time.strftime("%x %X")))
@@ -542,7 +517,7 @@ class LocalDriver(Driver):
if cross:
current.writeln("- Mappings: {0},{1}".format(client.getMapping(), server.getMapping()))
if not current.config.canRun(current) or not current.testcase.canRun(current):
- current.result.skipped(self.testcase, "not supported with this configuration")
+ current.writeln("skipped, not supported with this configuration")
return
success = False
@@ -563,7 +538,7 @@ class LocalDriver(Driver):
if confStr:
current.writeln("- Config: {0}".format(confStr))
if not current.config.canRun(current) or not current.testcase.canRun(current):
- current.result.skipped(self.testcase, "not supported with this configuration")
+ current.writeln("skipped, not supported with this configuration")
return
current.testcase._runClientSide(current)