summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-10-20 17:15:05 +0200
committerJose <jose@zeroc.com>2016-10-20 17:15:05 +0200
commitd94b27fb99c3dead83f3bfb978c01708906ba9dc (patch)
treee94095d4232b2038af0cdf6034676388a3f71f6c /scripts/TestUtil.py
parentFix slice2js relative path computation (diff)
downloadice-d94b27fb99c3dead83f3bfb978c01708906ba9dc.tar.bz2
ice-d94b27fb99c3dead83f3bfb978c01708906ba9dc.tar.xz
ice-d94b27fb99c3dead83f3bfb978c01708906ba9dc.zip
Fix to allow run es5 test in Windows
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 32a57da6d4d..22e4c6e1255 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -1475,7 +1475,10 @@ def getMirrorDir(base, mapping):
after = []
if lang == "js":
- base = base.replace("/es5", "")
+ if isWin32():
+ base = base.replace("\\es5", "")
+ else:
+ base = base.replace("/es5", "")
elif "java" in lang:
# Remove Java's extra directory structure from the path while we search it
base = base.replace(os.path.join("src", "main", "java", "test"), '')
@@ -2494,8 +2497,13 @@ def runTests(start, expanded, num = 0, script = False):
print(" exit 1")
print("fi")
else:
- if dir.find(os.path.join("js","test")) != -1 and es5 and dir.find("/es5/") == -1:
- dir = dir.replace("test/Ice/", "test/Ice/es5/").replace("test/Glacier2/", "test/Glacier2/es5/")
+ if isWin32():
+ if dir.find(os.path.join("js", "test")) != -1 and es5 and dir.find("\\es5\\") == -1:
+ dir = dir.replace("test\\Ice\\", "test\\Ice\\es5\\").replace("test\\Glacier2\\", "test\\Glacier2\\es5\\")
+ print("dir: {0}".format(dir))
+ else:
+ if dir.find(os.path.join("js", "test")) != -1 and es5 and dir.find("/es5/") == -1:
+ dir = dir.replace("test/Ice/", "test/Ice/es5/").replace("test/Glacier2/", "test/Glacier2/es5/")
status = os.system(sys.executable + " " + quoteArgument(os.path.join(dir, "run.py")) + " " + args)
if status:
status = status if isWin32() else (status >> 8)