APP_STOP = "adb -s %s shell am force-stop %s"
XWALK_APP_STR = "org.xwalk.%s/.%sActivity"
+
LOGCAT_CLEAR = "adb -s %s shell logcat -c"
LOGCAT_START = "adb -s %s shell logcat -v time"
DMESG_CLEAR = "adb -s %s shell dmesg -c"
cmdline = APP_STOP % (self.deviceid, pkg_name)
exit_code, ret = shell_command(cmdline)
cmdline = APP_START % (self.deviceid, wgt_name)
- while timecnt < 3:
+ exit_code, ret = shell_command(cmdline)
+ if len(ret) > 1:
+ cmdline = APP_START % (self.deviceid, wgt_name.replace('Activity', ''))
exit_code, ret = shell_command(cmdline)
- if len(ret) > 0 and ret[0].find('Starting') != -1:
- blauched = True
- break
- timecnt += 1
- time.sleep(3)
+ blauched = True
+ time.sleep(3)
else:
cmdline = APP_NONBLOCK_STR % (self.deviceid, wgt_name)
exit_code, ret = shell_command(cmdline)
build_info['buildid'] = ''
build_info['manufacturer'] = ''
build_info['model'] = ''
-
- builfinfo_file = os.path.expanduser("~") + os.sep + "tizen_buildinfo.xml"
- if self.download_file(BUILD_INFO_FILE, builfinfo_file) and os.path.exists(builfinfo_file):
- root = etree.parse(builfinfo_file).getroot()
- for element in root.findall("buildinfo"):
- if element is not None:
- if element.get("name").lower() == 'buildversion':
- child = etree.Element.getchildren(element)
- if child and child[0].text:
- buildid = child[0].text
- build_info['buildid'] = buildid
- if element.get("name").lower() == 'manufacturer':
- child = etree.Element.getchildren(element)
- if child and child[0].text:
- manufacturer = child[0].text
- build_info['manufacturer'] = manufacturer
- if element.get("name").lower() == 'model':
- child = etree.Element.getchildren(element)
- if child and child[0].text:
- model = child[0].text
- build_info['model'] = model
- os.remove(builfinfo_file)
return build_info
+
def get_target_conn(device_id=None):
""" Get connection for Test Target"""
if device_id is None: