Automation for build and test OpenCV Manager on several devices added.

This commit is contained in:
Alexander Smorkalov
2012-10-02 14:59:00 +04:00
parent d64d76086e
commit ad58e96581
4 changed files with 67 additions and 10 deletions

View File

@@ -1,16 +1,22 @@
#!/usr/bin/python
import os
import sys
TARGET_DEVICE_PATH = "/data/data/EngineTest"
DEVICE_NAME = ""
DEVICE_STR = ""
DEVICE_ARCH = "armeabi"
if (DEVICE_NAME != ""):
DEVICE_STR = "-s " + DEVICE_NAME
if (__name__ == "__main__"):
print("Waiting for device ...")
if (len(sys.argv) >= 3):
DEVICE_ARCH = sys.argv[1]
DEVICE_NAME = sys.argv[2]
if (DEVICE_NAME != ""):
DEVICE_STR = "-s \"" + DEVICE_NAME + "\""
print("Waiting for device \"%s\" with arch \"%s\" ..." % (DEVICE_NAME, DEVICE_ARCH))
os.system("adb %s wait-for-device" % DEVICE_STR)
os.system("adb %s shell mkdir -p %s" % (DEVICE_STR, TARGET_DEVICE_PATH))
os.system("adb %s push ./engine/libs/%s/libOpenCVEngine.so %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))