am 55bfddad: Merge change 24931 into eclair

Merge commit '55bfddad197f1a82d94152ee82bb110d8a9f32d9' into eclair-plus-aosp

* commit '55bfddad197f1a82d94152ee82bb110d8a9f32d9':
  Fix the bogus crashes in layout and reliability tests (the device actually went offline).
This commit is contained in:
Guang Zhu
2009-09-14 15:29:24 -07:00
committed by Android Git Automerger
2 changed files with 23 additions and 3 deletions

View File

@@ -197,7 +197,17 @@ def main(options, args):
logging.error("DumpRenderTree crashed, output:\n" + adb_output)
shell_cmd_str = adb_cmd + " shell cat /sdcard/android/running_test.txt"
crashed_test = subprocess.Popen(shell_cmd_str, shell=True, stdout=subprocess.PIPE).communicate()[0]
crashed_test = ""
while not crashed_test:
(crashed_test, err) = subprocess.Popen(
shell_cmd_str, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()
crashed_test = crashed_test.strip()
if not crashed_test:
logging.error('Cannot get crashed test name, device offline?')
logging.error('stderr: ' + err)
logging.error('retrying in 10s...')
time.sleep(10)
logging.info(crashed_test + " CRASHED");
crashed_tests.append(crashed_test);

View File

@@ -195,8 +195,18 @@ def main(options, args):
while not DumpRenderTreeFinished(adb_cmd):
logging.error("DumpRenderTree exited before all URLs are visited.")
shell_cmd_str = adb_cmd + " shell cat " + TEST_STATUS_FILE
crashed_test = subprocess.Popen(shell_cmd_str, shell=True,
stdout=subprocess.PIPE).communicate()[0]
crashed_test = ""
while not crashed_test:
(crashed_test, err) = subprocess.Popen(
shell_cmd_str, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()
crashed_test = crashed_test.strip()
if not crashed_test:
logging.error('Cannot get crashed test name, device offline?')
logging.error('stderr: ' + err)
logging.error('retrying in 10s...')
time.sleep(10)
logging.info(crashed_test + " CRASHED")
crashed_tests.append(crashed_test)
Bugreport(crashed_test, bugreport_dir, adb_cmd)