fix retry issue
authorliuct <liuchengtao1982@gmail.com>
Tue, 9 Sep 2014 17:56:28 +0000 (01:56 +0800)
committerliuct <liuchengtao1982@gmail.com>
Tue, 9 Sep 2014 18:08:01 +0000 (02:08 +0800)
packaging/testkit-lite.dsc
testkitlite/engines/test_executer.py

index a208a7f..df24ed6 100644 (file)
@@ -7,5 +7,5 @@ Standards-Version: 3.9.2
 Homepage: https://github.com/testkit/testkit-manager
 Version: 3.1.7
 Files:
7ba2ed2bfadf2ecf3b5d283b6d0e915a 1398123 testkit-lite_3.1.7.tar.gz
e3b0bfd4442c7301aa9982201c6ebd3b 1398131 testkit-lite_3.1.7.tar.gz
 
index 1bd98c6..2e7797a 100644 (file)
@@ -93,8 +93,8 @@ class TestExecuter:
             self.test_prefix = driver_env['test_prefix']
             self.web_driver = WebDriver(self.wd_url, driver_env['desired_capabilities'])
             self.__updateTestPrefix()
+            return True
         except Exception, e:
-            self.TE_LOG.error('Init Web Driver failed: %s' % e)
             if self.target_platform.upper().find('ANDROID') >= 0:
                 try:
                     test_ext = test_ext.strip('.').replace('Activity', '')
@@ -104,12 +104,13 @@ class TestExecuter:
                     driver_env = initCapability(test_app, test_ext)
                     self.web_driver = WebDriver(self.wd_url, driver_env['desired_capabilities'])
                     self.__updateTestPrefix()
+                    return True
                 except Exception, e:
                     self.TE_LOG.error('Retry to init Web Driver get failed: %s' % e)
                     return False
             else:
+                self.TE_LOG.error('Init Web Driver failed: %s' % e)
                 return False
-        return True
 
     def __talkWithRunnerRecv(self):
         try: