summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-04-11 08:04:05 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-04-11 08:04:05 +0200
commit63514b646c456ac7f94f03a6f7d130138f8d36eb (patch)
treeb664b01ce0274c61d9ef86ec2cc24cd03ef231b8 /scripts/TestUtil.py
parentMSbuild C++ build fixes (diff)
downloadice-63514b646c456ac7f94f03a6f7d130138f8d36eb.tar.bz2
ice-63514b646c456ac7f94f03a6f7d130138f8d36eb.tar.xz
ice-63514b646c456ac7f94f03a6f7d130138f8d36eb.zip
Fixed CLASSPATH issue related to alpha versioning when running tests
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index f6048a5173a..f622ab5fc44 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -218,6 +218,18 @@ def getIceSoVersion():
else:
return '%db%d' % (majorVersion * 10 + minorVersion, patchVersion - 71)
+def getIceJsonVersion():
+ r = re.search(r"([0-9]+)\.([0-9]+)(\.[0-9]+|[ab][0-9]+)", iceVersion)
+ major = int(r.group(1))
+ minor = int(r.group(2))
+ v = ("%d.%d" % (major, minor)).strip()
+ if r.group(3).startswith("a"):
+ return v + ".0-" + r.group(3).replace("a", "alpha").strip()
+ elif r.group(3).startswith("b"):
+ return v + ".0-" + r.group(3).replace("b", "beta").strip()
+ else:
+ return ("%s%s" % (v, r.group(3))).strip()
+
def getJdkVersion():
process = subprocess.Popen("java -version", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
if not process or not process.stdout:
@@ -1850,7 +1862,7 @@ def getTestEnv(lang, testdir):
#
iceJARs = ["ice", "glacier2", "freeze", "icebox", "icestorm", "icegrid", "icepatch2", "icediscovery",
"icelocatordiscovery"]
- jarSuffix = "-" + iceVersion + ".jar"
+ jarSuffix = "-" + getIceJsonVersion() + ".jar"
# First sanitize the environment.
env["CLASSPATH"] = sanitize(os.getenv("CLASSPATH", ""))