diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-28 12:04:59 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-28 12:04:59 +0100 |
commit | 7dc9c96028a2a3fbb74aa40808e34d9e386fe8a8 (patch) | |
tree | 83f436f97c313878756d2f8b19ee26dff4241bb9 /scripts/Util.py | |
parent | Another fix for Process default arguments, added process argument to getTestCwd (diff) | |
download | ice-7dc9c96028a2a3fbb74aa40808e34d9e386fe8a8.tar.bz2 ice-7dc9c96028a2a3fbb74aa40808e34d9e386fe8a8.tar.xz ice-7dc9c96028a2a3fbb74aa40808e34d9e386fe8a8.zip |
Fixed IceBox C++11 test failure
Diffstat (limited to 'scripts/Util.py')
-rw-r--r-- | scripts/Util.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/scripts/Util.py b/scripts/Util.py index 0b4d1c5dccc..73b792945e7 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -74,10 +74,10 @@ class Platform: setattr(self, varname, valuefn(value) if valuefn else value) def getDefaultBuildPlatform(self): - return os.environ.get("PLATFORMS", "").split(" ")[0] or self.supportedPlatforms[0] + return self.supportedPlatforms[0] def getDefaultBuildConfig(self): - return os.environ.get("CONFIGS", "").split(" ")[0] or self.supportedConfigs[0] + return self.supportedConfigs[0] def getBinSubDir(self, mapping, current): # Return the bin sub-directory for the given mapping,platform,config, @@ -266,7 +266,8 @@ def parseOptions(obj, options, mapped={}): # Transform configuration options provided on the command line to # object data members. The data members must be already set on the # object and with the correct type. - obj.parsedOptions=[] + if not hasattr(obj, "parsedOptions"): + obj.parsedOptions=[] remaining = [] for (o, a) in options: if o.startswith("--"): o = o[2:] @@ -339,8 +340,20 @@ class Mapping: print("--platform=<platform> Build plaform for native executables.") def __init__(self, options=[]): - self.buildConfig = platform.getDefaultBuildConfig() - self.buildPlatform = platform.getDefaultBuildPlatform() + # Build configuration + self.parsedOptions = [] + self.buildConfig = os.environ.get("CONFIGS", "").split(" ")[0] + if self.buildConfig: + self.parsedOptions.append("buildConfig") + else: + self.buildConfig = platform.getDefaultBuildConfig() + + self.buildPlatform = os.environ.get("PLATFORMS", "").split(" ")[0] + if self.buildPlatform: + self.parsedOptions.append("buildPlatform") + else: + self.buildPlatform = platform.getDefaultBuildPlatform() + self.protocol = "tcp" self.compress = False self.serialize = False |