From ded578ad889afa6994f65e21155bb8e85d72b627 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Fri, 9 Sep 2016 04:17:23 +0800 Subject: android cts: udpate for using android-cts-7.0 package Change-Id: Id6a514bb5a82c8a2480d45a73d6f6e21aec1f350 Signed-off-by: Yongqin Liu --- android/scripts/cts.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'android') diff --git a/android/scripts/cts.py b/android/scripts/cts.py index fab821f..a55c723 100755 --- a/android/scripts/cts.py +++ b/android/scripts/cts.py @@ -119,12 +119,12 @@ def result_parser(xml_file): root = tree.getroot() print 'There are ' + str(len(root.findall('TestPackage'))) + ' Test Packages in this test result file: ' + xml_file # testcase_counter = 0 - for elem in root.findall('TestPackage'): + for elem in root.findall('Module'): # Naming: Package Name + Test Case Name + Test Name if 'abi' in elem.attrib.keys(): - package_name = '.'.join([elem.attrib['abi'], elem.attrib['appPackageName']]) + package_name = '.'.join([elem.attrib['abi'], elem.attrib['name']]) else: - package_name = elem.attrib['appPackageName'] + package_name = elem.attrib['name'] tests_executed = len(elem.findall('.//Test')) tests_passed = len(elem.findall('.//Test[@result="pass"]')) tests_failed = len(elem.findall('.//Test[@result="fail"]')) @@ -225,8 +225,8 @@ subprocess.call(['lava-test-run-attach', CTS_STDOUT + '.gz']) subprocess.call(['lava-test-run-attach', CTS_LOGCAT + '.gz']) # locate and parse the test result -result_dir = 'android-cts/repository/results' -test_result = 'testResult.xml' +result_dir = 'android-cts/results' +test_result = 'test_result.xml' if os.path.exists(result_dir) and os.path.isdir(result_dir): for root, dirs, files in os.walk(result_dir): for name in files: -- cgit v1.2.3