diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-29 14:03:47 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-29 14:03:47 +0100 |
commit | 3f86980ba3c654c90f9cb7230b6c9855e6df8b51 (patch) | |
tree | 8ae66110804889889239f651b9309c1915206400 | |
parent | IceGrid/noRestartUpdate failure, print out the reason of the failure (diff) | |
download | ice-3f86980ba3c654c90f9cb7230b6c9855e6df8b51.tar.bz2 ice-3f86980ba3c654c90f9cb7230b6c9855e6df8b51.tar.xz ice-3f86980ba3c654c90f9cb7230b6c9855e6df8b51.zip |
Fixed Ice/properties test failure
-rwxr-xr-x | js/test/Common/run.js | 10 | ||||
-rw-r--r-- | js/test/Ice/properties/Client.js | 4 | ||||
-rw-r--r-- | scripts/LocalDriver.py | 4 | ||||
-rw-r--r-- | scripts/Util.py | 8 | ||||
-rw-r--r-- | scripts/tests/Ice/properties.py | 2 |
5 files changed, 17 insertions, 11 deletions
diff --git a/js/test/Common/run.js b/js/test/Common/run.js index 40d83aff47a..44d74e784cd 100755 --- a/js/test/Common/run.js +++ b/js/test/Common/run.js @@ -7,9 +7,13 @@ // // ********************************************************************** +var es5 = process.argv[2] === "--es5" +if(es5) +{ + process.argv.splice(2, 1) +} - -var Ice = require(process.argv[2] === "--es5" ? "ice/src/es5" : "ice").Ice; +var Ice = require(es5 ? "ice/src/es5" : "ice").Ice; var write = function(msg) { @@ -23,7 +27,7 @@ var writeLine = function(msg) var id = new Ice.InitializationData(); id.properties = Ice.createProperties(process.argv); -exe = process.argv[2] === "--es5" ? process.argv[3] : process.argv[2] +exe = process.argv[2] var test = module.require(exe) test = exe === "ClientBidir" ? test.__testBidir__ : test.__test__; diff --git a/js/test/Ice/properties/Client.js b/js/test/Ice/properties/Client.js index 9af3b7beb49..68a0b439aa1 100644 --- a/js/test/Ice/properties/Client.js +++ b/js/test/Ice/properties/Client.js @@ -50,13 +50,13 @@ "BServer": "\\server\\dir" }; - var properties = Ice.createProperties(); + var properties = Ice.createProperties(process.argv); if(typeof(require("fs").readFileSync) == "function") { // // We are runing with NodeJS we load the properties file from the file system. // - properties.parse(require("fs").readFileSync("config/escapes.cfg", {encoding: "utf8"})); + properties.parse(require("fs").readFileSync(process.argv[3] + "/config/escapes.cfg", {encoding: "utf8"})); for(var key in props) { test(props[key] == properties.getProperty(key)); diff --git a/scripts/LocalDriver.py b/scripts/LocalDriver.py index 6dc18ba369a..e71b7b5facb 100644 --- a/scripts/LocalDriver.py +++ b/scripts/LocalDriver.py @@ -344,11 +344,11 @@ class LocalDriver(Driver): else: self.runner = TestCaseRunner() - def run(self, mappings): + def run(self, mappings, testSuiteIds): while True: executor = Executor(self.threadlocal, self.workers, self.continueOnFailure) for mapping in mappings: - testsuites = mapping.getTestSuites() + testsuites = mapping.getTestSuites(testSuiteIds) # # Sort the test suites to run tests in the following order. diff --git a/scripts/Util.py b/scripts/Util.py index 0221e94305b..6dad4ddcadf 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -585,8 +585,10 @@ class Mapping: if testcases: TestSuite(root, testcases) - def getTestSuites(self): - return self.testsuites.values() + def getTestSuites(self, ids=[]): + if not ids: + return self.testsuites.values() + return [self.testsuites[testSuiteId] for testSuiteId in ids if testSuiteId in self.testsuites] def addTestSuite(self, testsuite): assert len(testsuite.path) > len(self.getTestsPath()) + 1 @@ -2153,7 +2155,7 @@ def runTests(mappings=None, drivers=None): # Finally, run the test suites with the driver. # try: - sys.exit(driver.run(mappings)) + sys.exit(driver.run(mappings, args)) except KeyboardInterrupt: pass finally: diff --git a/scripts/tests/Ice/properties.py b/scripts/tests/Ice/properties.py index 92a9832aa61..f0a862ad735 100644 --- a/scripts/tests/Ice/properties.py +++ b/scripts/tests/Ice/properties.py @@ -20,4 +20,4 @@ class PropertiesTestSuite(TestSuite): "Config.Path=./config/" + name], "utf-8") -PropertiesTestSuite(__name__) +PropertiesTestSuite(__name__, [ ClientTestCase(client=Client(args=["{testdir}"])) ]) |