diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-11-03 15:27:39 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-11-03 15:27:39 -0330 |
commit | 583832407f5e29a9b490c0d45a8cf9d862f8717f (patch) | |
tree | d123a16541e5f50989d72cdee41697b6655f2626 /scripts/TestUtil.py | |
parent | OS X installer updates (diff) | |
download | ice-583832407f5e29a9b490c0d45a8cf9d862f8717f.tar.bz2 ice-583832407f5e29a9b490c0d45a8cf9d862f8717f.tar.xz ice-583832407f5e29a9b490c0d45a8cf9d862f8717f.zip |
ICE-5818 cross tests no longer work with java
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-x | scripts/TestUtil.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index 42d4b2d595f..a7cf3b1e46f 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -1195,11 +1195,22 @@ def getMirrorDir(base, mapping): current = os.path.basename(before) before = os.path.dirname(before) if current == lang: + # Deal with Java's different directory structure + if lang == "java": + while len(before) > 0: + current = os.path.basename(before) + before = os.path.dirname(before) + if current == lang: + break break after.insert(0, current) else: raise RuntimeError("cannot find language dir") - return os.path.join(before, mapping, *after) + dir = os.path.join(before, mapping) + # Deal with Java's different directory structure + if mapping == "java": + dir = os.path.join(dir, "test", "src", "main", "java") + return os.path.join(dir, *after) def getMappingDir(base, mapping, dirnames): """Get the directory for the given mapping.""" @@ -1899,7 +1910,12 @@ def runTests(start, expanded, num = 0, script = False): if index < start: continue i = os.path.normpath(i) - dir = os.path.join(toplevel, i) + + # Deal with Java's different directory structure + if i.find(os.path.join("java","test")) != -1: + dir = os.path.join(toplevel, "java", "test", "src", "main", i) + else: + dir = os.path.join(toplevel, i) sys.stdout.write("\n") if num > 0: |