summaryrefslogtreecommitdiff
path: root/scripts/IceBoxUtil.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-12-13 21:47:41 +0100
committerJose <jose@zeroc.com>2017-12-13 21:47:41 +0100
commitb633b4744135ec0e2e533b82e4aa718f12334183 (patch)
tree89ba2cb87094e69e39e2d8f6aac2e1f1f86e5628 /scripts/IceBoxUtil.py
parentOnly build and run .Net Core when the SDK is installed (diff)
downloadice-b633b4744135ec0e2e533b82e4aa718f12334183.tar.bz2
ice-b633b4744135ec0e2e533b82e4aa718f12334183.tar.xz
ice-b633b4744135ec0e2e533b82e4aa718f12334183.zip
Rework C# project structure
- .NET 4.5 projects go to msbuild\net45 - .NET Standard 2.0 projects go to msbuild\netstandard2.0 - .NET Standard projects can be build for different target frameworks the default is .NET Core 2.0 but this can be override setting IceTestsFramworks MSBuild property
Diffstat (limited to 'scripts/IceBoxUtil.py')
-rw-r--r--scripts/IceBoxUtil.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/IceBoxUtil.py b/scripts/IceBoxUtil.py
index c58fa3ae525..d53ebfc9e1a 100644
--- a/scripts/IceBoxUtil.py
+++ b/scripts/IceBoxUtil.py
@@ -14,6 +14,35 @@ class IceBox(ProcessFromBinDir, Server):
processType = "icebox"
+ def __init__(self, *args, **kargs):
+ Server.__init__(self, *args, **kargs)
+
+ # Find config file
+ if 'args' in kargs:
+ for v in kargs['args']:
+ if "--Ice.Config=" in v:
+ self.config = v.replace("--Ice.Config=", "")
+ break
+
+ def setup(self, current):
+ mapping = self.mapping or current.testcase.getMapping()
+ #
+ # If running IceBox tests with .NET Core we need to generate a config
+ # file that use the service for the .NET Framework used to build the
+ # tests
+ #
+ if isinstance(mapping, CSharpMapping) and current.config.netframework:
+
+ targetConfig = os.path.abspath(
+ self.config.strip('"').format(testdir=current.testsuite.getPath(),
+ iceboxconfigext=".{0}".format(current.config.netframework)))
+ baseConfig = targetConfig.rstrip(".{0}".format(current.config.netframework))
+ with open(baseConfig, 'r') as config:
+ with open(targetConfig, 'w') as target:
+ for line in config.readlines():
+ target.write(line.replace("\\net45\\", "\\netstandard2.0\\{0}\\".format(current.config.netframework)))
+ current.files.append(targetConfig)
+
class IceBoxAdmin(ProcessFromBinDir, Client):
processType = "iceboxadmin"