diff options
author | Jose <jose@zeroc.com> | 2017-06-07 11:58:28 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-06-07 11:58:28 +0200 |
commit | 2ab5d7b25413b1cb4d9d1f9c471bbfc232dfbf0a (patch) | |
tree | 4b05557bee92759adb686b2227c168151a390961 /scripts/Util.py | |
parent | Fixed Python AMI test failure & improved Java test (diff) | |
download | ice-2ab5d7b25413b1cb4d9d1f9c471bbfc232dfbf0a.tar.bz2 ice-2ab5d7b25413b1cb4d9d1f9c471bbfc232dfbf0a.tar.xz ice-2ab5d7b25413b1cb4d9d1f9c471bbfc232dfbf0a.zip |
Fixed (ICE-7973) - C++ allTests.py broken for V140 release
Diffstat (limited to 'scripts/Util.py')
-rw-r--r-- | scripts/Util.py | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/scripts/Util.py b/scripts/Util.py index bfcdb9d6075..017a298af3c 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -292,14 +292,16 @@ class Windows(Platform): config = "Debug" if buildConfig.find("Debug") >= 0 else "Release" if current.driver.useIceBinDist(mapping): - compiler = self.getCompiler() - vc140 = compiler == "VC140" - cpp = isinstance(mapping, CppMapping) - csharp = isinstance(mapping, CSharpMapping) - - if ((cpp and vc140 and platform == "x64" and buildConfig == "Release") or - (not csharp and not cpp) or - (not compiler)): + + with open(os.path.join(toplevel, "config", "icebuilder.props"), "r") as configFile: + version = re.search("<IceJSONVersion>(.*)</IceJSONVersion>", configFile.read()).group(1) + packageSuffix = self.getPlatformToolset() if isinstance(mapping, CppMapping) else "net" + package = os.path.join(mapping.path, "msbuild", "packages", "{0}".format( + mapping.getNugetPackage(packageSuffix, version))) if hasattr(mapping, "getNugetPackage") else None + + nuget = package and os.path.exists(package) + + if (not nuget): return "bin" elif csharp or isinstance(process, SliceTranslator): return os.path.join("tools") @@ -343,24 +345,9 @@ class Windows(Platform): version = re.search("<IceJSONVersion>(.*)</IceJSONVersion>", configFile.read()).group(1) packageSuffix = self.getPlatformToolset() if isinstance(mapping, CppMapping) else "net" - compiler = self.getCompiler() - vc140 = compiler == "VC140" - cpp = isinstance(mapping, CppMapping) - csharp = isinstance(mapping, CSharpMapping) - - # - # Use binary distribution from ICE_HOME if building for C++/VC140/x64/Release or - # for another mapping than C++ or C#. - # - if ((cpp and vc140 and platform == "x64" and current.config.buildConfig == "Release") or - (not csharp and not cpp) or - (not compiler)): - return os.environ.get("ICE_HOME") - - # - # Otherwise, use the appropriate nuget package - # - return os.path.join(mapping.path, "msbuild", "packages", "{0}".format(mapping.getNugetPackage(packageSuffix, version))) + package = os.path.join(mapping.path, "msbuild", "packages", "{0}".format( + mapping.getNugetPackage(packageSuffix, version))) if hasattr(mapping, "getNugetPackage") else None + return package if package and os.path.exists(package) else os.environ.get("ICE_HOME") def canRun(self, mapping, current): # |