summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree/assets
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2009-09-14 11:27:40 -0700
committerGuang Zhu <guangzhu@google.com>2009-09-14 11:27:40 -0700
commit60ef21a5daff22dca1c562da8d131c67c8587353 (patch)
treec4db0e7a14b2a4cd0fcdc223cb00ad4efb4e84db /tests/DumpRenderTree/assets
parent0fdae4cc744c3be3855b47e82d2244df8503258c (diff)
downloadframeworks_base-60ef21a5daff22dca1c562da8d131c67c8587353.zip
frameworks_base-60ef21a5daff22dca1c562da8d131c67c8587353.tar.gz
frameworks_base-60ef21a5daff22dca1c562da8d131c67c8587353.tar.bz2
Fix the parsing for instrumentation result, some Java exceptions are not reported right now
Diffstat (limited to 'tests/DumpRenderTree/assets')
-rwxr-xr-xtests/DumpRenderTree/assets/run_page_cycler.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/DumpRenderTree/assets/run_page_cycler.py b/tests/DumpRenderTree/assets/run_page_cycler.py
index 2325047..4a68d72 100755
--- a/tests/DumpRenderTree/assets/run_page_cycler.py
+++ b/tests/DumpRenderTree/assets/run_page_cycler.py
@@ -59,8 +59,18 @@ def main(options, args):
run_load_test_cmd = run_load_test_cmd_prefix + " -e class com.android.dumprendertree.LoadTestsAutoTest#runPageCyclerTest -e path \"" + path + "\" -e timeout " + timeout_ms + run_load_test_cmd_postfix
(adb_output, adb_error) = subprocess.Popen(run_load_test_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
- if adb_output.find('INSTRUMENTATION_FAILED') != -1 or \
- adb_output.find('Process crashed.') != -1:
+ fail_flag = False
+ for line in adb_output.splitlines():
+ line = line.strip()
+ if line.find('INSTRUMENTATION_CODE') == 0:
+ if not line[22:] == '-1':
+ fail_flag = True
+ break
+ if (line.find('INSTRUMENTATION_FAILED') != -1 or
+ line.find('Process crashed.') != -1):
+ fail_flag = True
+ break
+ if fail_flag:
logging.error("Error happened : " + adb_output)
sys.exit(1)
@@ -80,7 +90,6 @@ def main(options, args):
shell_cmd_str = adb_cmd + " pull " + result_file + " " + results_dir
adb_output = subprocess.Popen(shell_cmd_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
logging.info(adb_output)
-
logging.info("Results are stored under: " + results_dir + "/load_test_result.txt\n")
if '__main__' == __name__: