fix issue of test_app undefined
authorchengtao.liu <chengtaox.liu@intel.com>
Wed, 23 Jul 2014 10:30:54 +0000 (18:30 +0800)
committerchengtao.liu <chengtaox.liu@intel.com>
Wed, 23 Jul 2014 10:30:54 +0000 (18:30 +0800)
packaging/testkit-lite.dsc
testkit-lite
testkitlite/engines/test_executer.py
testkitlite/engines/webdriver.py

index 0cb655c31da83bd53c08ac9252d1dc3a9e6077be..f36e57bf034987e63cb0e611f399a25b667bff18 100644 (file)
@@ -7,5 +7,5 @@ Standards-Version: 3.9.2
 Homepage: https://github.com/testkit/testkit-manager
 Version: 3.1.4
 Files:
c3a66c1b17dae4a013b82873d829e206 1396893 testkit-lite_3.1.4.tar.gz
d09179596bc5e28e834d2c83b2a5d1d5 1396889 testkit-lite_3.1.4.tar.gz
 
index a2619172850a67eaf590213cb1528e8ae212dde4..ce02bdc475e19a199e1a0d948bc026aefe716f66 100755 (executable)
@@ -296,7 +296,7 @@ to resolve this issue" % (LOG_DIR)
         exec 'from testkitlite.capability.%s import initCapability' % OPTIONS.targetplatform
         if OPTIONS.targetplatform.upper().find('TIZEN') >= 0:
             if not OPTIONS.debugip:
-                raise ValueError("tizen xwalk need a debugip value!")
+                raise ValueError("For tizen xwalk, option --debugip needed!")
             webdriver_vars = initCapability('TEST_APP_ID', OPTIONS.debugip)
         elif OPTIONS.targetplatform.upper().find('ANDROID') >= 0:
             webdriver_vars = initCapability('TEST_APP_NAME')
index e08cd09bdc4ed94022dd078b4d4dcd3b533d6607..273429bfb9524eb6f548b3bb3992a8506b8d0fab 100644 (file)
@@ -98,11 +98,10 @@ class TestExecuter:
                 self.wd_url = DEFAULT_WD_URL
 
             test_app = ''
-            appis = ''
             if self.target_platform.upper().find('ANDROID') >= 0:
                 test_app = self.suite_name.replace('-', '_')
                 self.TE_LOG.debug(
-                    'Got ANDROID platform, update the app name to %s' % test_app_name)
+                    'Got ANDROID platform, update the app name to %s' % test_app)
             elif self.target_platform.upper().find('TIZEN') >= 0:
                 test_app = self.appid
             else:
@@ -487,6 +486,7 @@ class TestExecuter:
                 break
 
     def __runTests(self, haha=None, kkkk=None):
+        print 'xxx',os.environ['TEST_PLATFORM']
         for i_case in self.tests_json['cases']:
             i_case['result'] = STR_NOTRUN
         if self.set_exetype == "manual":
index d41e47a32c35b7da2d03c5a9c0328e303cba6a99..a07600bf7e9c9aa386e62d925fc972535478765b 100644 (file)
@@ -247,6 +247,8 @@ class TestWorker(object):
     def talkWithEXE(self, command=None, data=None, recv_timeout=None):
         # LOGGER.debug('Start send: %s, %s' % (command, data))
         try:
+            if self.exe_socket is None:
+                return (None, None)
             self.exe_socket.settimeout(recv_timeout)
             self.exe_socket_connect.send(
                 json.dumps({'COMMAND': command, 'DATA': data}))