update launcher codes for web test
authorchengtao.liu <chengtaox.liu@intel.com>
Mon, 24 Mar 2014 07:44:22 +0000 (15:44 +0800)
committerchengtao.liu <chengtaox.liu@intel.com>
Mon, 24 Mar 2014 07:44:22 +0000 (15:44 +0800)
commodule/impl/androidmobile.py
commodule/impl/tizenmobile.py

index 545eecd5b3455157c16c6131158e7401200ae696..02669bc5b8f0f8bd43beab3cc9a03eee8282a6d6 100644 (file)
@@ -39,6 +39,7 @@ APP_START = "adb -s %s shell am start -n %s"
 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"
@@ -250,13 +251,12 @@ class AndroidMobile:
             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)
index a4e054f361f2ce3731d9ae87f277bfb0febd21c2..742da84acb01d5b983973ceabc1d484a0b26fd5c 100644 (file)
@@ -477,30 +477,9 @@ class TizenMobile:
         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: