summaryrefslogtreecommitdiff
path: root/scripts/Util.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-05-22 23:00:22 +0200
committerJose <jose@zeroc.com>2017-05-22 23:00:22 +0200
commitb3b664c1057858a5915500e6d58c209aaf92e353 (patch)
tree0fba1b49fa743b37ffb9a117994fc4d7ab0e62ed /scripts/Util.py
parentAnother fix for static builds (diff)
downloadice-b3b664c1057858a5915500e6d58c209aaf92e353.tar.bz2
ice-b3b664c1057858a5915500e6d58c209aaf92e353.tar.xz
ice-b3b664c1057858a5915500e6d58c209aaf92e353.zip
Fix (ICE-7486) - Port the controller app to Android
Diffstat (limited to 'scripts/Util.py')
-rw-r--r--scripts/Util.py37
1 files changed, 34 insertions, 3 deletions
diff --git a/scripts/Util.py b/scripts/Util.py
index bb9467bd1da..67c63790abf 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -2011,7 +2011,7 @@ class AndroidProcessController(RemoteProcessController):
def startControllerApp(self, current, ident):
if current.config.avd:
self.startEmulator(current.config)
- run("{} install -r test/controller/build/outputs/apk/testController-debug.apk".format(self.adb()))
+ run("{} install -t -r {}".format(self.adb(), current.config.apk))
run("{} shell am start -n com.zeroc.testcontroller/.ControllerActivity".format(self.adb()))
def stopControllerApp(self, ident):
@@ -2535,7 +2535,7 @@ class Driver:
initData.properties.setProperty("Ice.Default.Host", self.interface)
initData.properties.setProperty("Ice.ThreadPool.Server.Size", "10")
#initData.properties.setProperty("Ice.Trace.Protocol", "1")
- #initData.properties.setProperty("Ice.Trace.Network", "2")
+ #initData.properties.setProperty("Ice.Trace.Network", "3")
initData.properties.setProperty("Ice.Override.Timeout", "10000")
initData.properties.setProperty("Ice.Override.ConnectTimeout", "1000")
self.communicator = Ice.initialize(initData)
@@ -2801,11 +2801,41 @@ class Android:
class AndroidMapping(JavaMapping):
+ class Config(Mapping.Config):
+
+ @classmethod
+ def getSupportedArgs(self):
+ return ("", ["device=", "avd=", "androidemulator"])
+
+ @classmethod
+ def usage(self):
+ print("")
+ print("Android Mapping options:")
+ print("--device=<device-id> Id of the emulator or device used to run the tests.")
+ print("--androidemulator Run tests in emulator as opposed to a real device.")
+ print("--avd Start emulator image")
+
+ def __init__(self, options=[]):
+ Mapping.Config.__init__(self, options)
+
+ parseOptions(self, options, { "device" : "device", "avd" : "avd" })
+ self.androidemulator = self.androidemulator or self.avd
+ self.apk = "controller/build/outputs/apk/debug/testController-debug.apk"
+
+ def getSSLProps(self, process, current):
+ props = JavaMapping.getSSLProps(self, process, current)
+ props.update({
+ "IceSSL.KeystoreType" : "BKS",
+ "IceSSL.TruststoreType" : "BKS",
+ "Ice.InitPlugins" : "0",
+ "IceSSL.Keystore": "server.bks" if isinstance(process, Server) else "client.bks"})
+ return props
+
def getTestsPath(self):
return os.path.join(self.path, "../java/test/src/main/java/test")
def filterTestSuite(self, testId, config, filters=[], rfilters=[]):
- if not testId.startswith("Ice/"):
+ if not testId.startswith("Ice/") or testId in Android.getUnsuportedTests(config.protocol):
return True
return JavaMapping.filterTestSuite(self, testId, config, filters, rfilters)
@@ -2830,6 +2860,7 @@ class AndroidCompatMapping(JavaCompatMapping):
parseOptions(self, options, { "device" : "device", "avd" : "avd" })
self.androidemulator = self.androidemulator or self.avd
+ self.apk = "test/controller/build/outputs/apk/testController-debug.apk"
def getSSLProps(self, process, current):
props = JavaCompatMapping.getSSLProps(self, process, current)