test_app = ''
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)
+ #tmp_names = test_app.split('_')
+ #test_app = ''.join([it.capitalize() for it in tmp_names if it])
+ self.TE_LOG.debug('ANDROID platform, update the app name to %s' % test_app)
elif self.target_platform.upper().find('TIZEN') >= 0:
test_app = self.appid
else:
def __talkWithRunnerRecv(self):
try:
exe_data = self.exe_socket.recv(self.exe_socket_buff_size)
+ if exe_data is None:
+ return (None, None)
exe_json = json.loads(exe_data)
command = exe_json['COMMAND']
data = exe_json['DATA']
- self.TE_LOG.debug('Receive Data: %s' % exe_json)
except Exception, e:
self.TE_LOG.debug('Receive data failed, %s' % e)
time.sleep(2)
def __talkWithRunnerSend(self, data=None):
try:
- self.TE_LOG.debug('Send Data: %s' % data)
self.exe_socket.send(json.dumps(data))
except Exception, e:
self.TE_LOG.debug('Send data failed, %s' % e)
"document.getElementById(\"case-info-area\").className = \"READY\"")
if i_case_status in [STR_PASS, STR_FAIL, STR_BLOCK]:
self.tests_json['cases'][i_case]['result'] = i_case_status
- self.TE_LOG.info("Cases %s: %s" % (self.tests_json['cases'][i_case][
- 'case_id'], self.tests_json['cases'][i_case]['result']))
i_case = i_case + 1
elif i_case_status == "FORWARD":
i_case = i_case + 1
"%Y-%m-%d %H:%M:%S", time.localtime())
try:
i_case_timeout = i_case['timeout']
- self.TE_LOG.debug(
- "Using special timeout value: %s" % i_case_timeout)
except Exception, e:
i_case_timeout = DEFAULT_TIMEOUT
else:
i_case['result'] = STR_FAIL
- self.TE_LOG.info("Cases %s: %s" %
- (i_case['case_id'], i_case['result']))
-
def __getCaseIndex(self, url):
try:
value_pos = url.index('value')
element_index - 1]['entry']
url_equal = self.__checkUrlSame(pre_url, i_case['entry'])
i_case_timeout = i_case['timeout']
- self.TE_LOG.debug(
- "Using special timeout value: %s" % i_case_timeout)
except Exception, e:
i_case_timeout = DEFAULT_TIMEOUT
return False
try:
i_case_timeout = int(i_case['timeout'])
- self.TE_LOG.debug(
- "Using special timeout value: %s" % i_case_timeout)
except Exception, e:
i_case_timeout = DEFAULT_TIMEOUT
i_case['result'] = STR_FAIL
break
time.sleep(1)
- self.TE_LOG.info("Cases %s: %s" %
- (i_case['case_id'], i_case['result']))
except Exception, e:
i_case['result'] = STR_BLOCK
self.TE_LOG.error(
else:
end = idx * self.opts['block_size']
block_data = cases[start:end]
+ for tc in block_data:
+ tc.pop('purpose')
test_set_queues.append({'cases': block_data})
idx += 1
for section_json in test_set_queues:
if result_obj.get_status() == 1:
break
- LOGGER.info("Loading a new section for testing ...")
- time.sleep(EXECUTER_POLLING_INTERVAL)
+ LOGGER.info("Load a new section for testing, please wait ...")
get_result = False
while True:
if result_obj.get_status() == 1:
break
continue
elif exe_data == 'RUNNING':
+ time.sleep(EXECUTER_POLLING_INTERVAL)
continue
elif exe_data == 'DONE':
exe_command, exe_data = self.talkWithEXE(
break
if abort_from_set:
LOGGER.error('Exit from current set execution')
- break
+ return
+ ### normally exit
result_obj.set_status(1)
exe_command, exe_data = self.talkWithEXE(
'TERMINAL', '', 1)
self.conn = conn
self.server_url = None
self.result_obj = None
- self.opts = dict({'block_size': 20,
+ self.opts = dict({'block_size': 10,
'test_type': None,
'exe_socket_buff_size': 20480,
'runner_proc': os.getpid(),
json.dumps({'COMMAND': command, 'DATA': data}))
exe_data = self.exe_socket_connect.recv(
self.opts['exe_socket_buff_size'])
+ if not exe_data:
+ return (None, None)
exe_json = json.loads(exe_data)
if exe_json['COMMAND']:
command = exe_json['COMMAND']