log exception and init client_process

pull/22470/head
Eric Gribkoff 5 years ago
parent 694f491e06
commit 11671b0407
  1. 2
      tools/run_tests/run_xds_tests.py

@ -1069,6 +1069,7 @@ try:
if not os.path.exists(log_dir): if not os.path.exists(log_dir):
os.makedirs(log_dir) os.makedirs(log_dir)
test_log_file = open(os.path.join(log_dir, _SPONGE_LOG_NAME), 'w+') test_log_file = open(os.path.join(log_dir, _SPONGE_LOG_NAME), 'w+')
client_process = None
try: try:
client_process = subprocess.Popen(client_cmd, client_process = subprocess.Popen(client_cmd,
env=client_env, env=client_env,
@ -1106,6 +1107,7 @@ try:
result.state = 'PASSED' result.state = 'PASSED'
result.returncode = 0 result.returncode = 0
except Exception as e: except Exception as e:
logger.error('Test case %s failed: %s' % (test_case, e))
result.state = 'FAILED' result.state = 'FAILED'
result.message = str(e) result.message = str(e)
finally: finally:

Loading…
Cancel
Save