Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: build/android/single_test_runner.py

Issue 9963086: Build and push chrome.pak for ui_unittests on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/run_tests.py ('k') | build/android/test_package_executable.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import sys 7 import sys
8 8
9 from base_test_runner import BaseTestRunner 9 from base_test_runner import BaseTestRunner
10 import debug_info 10 import debug_info
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 Args: 103 Args:
104 failed_tests: A sorted list of failed tests. 104 failed_tests: A sorted list of failed tests.
105 """ 105 """
106 disabled_tests = [] 106 disabled_tests = []
107 if not self._running_on_emulator: 107 if not self._running_on_emulator:
108 filter_file_name = self._GetFilterFileName() 108 filter_file_name = self._GetFilterFileName()
109 else: 109 else:
110 filter_file_name = self._GetAdditionalEmulatorFilterName() 110 filter_file_name = self._GetAdditionalEmulatorFilterName()
111 disabled_tests.extend( 111 disabled_tests.extend(
112 run_tests_helper.GetExpectations(self._GetFilterFileName())) 112 run_tests_helper.GetExpectations(self._GetFilterFileName()))
113 logging.info('About to update emulator\'s addtional filter (%s).' 113 logging.info('About to update emulator\'s additional filter (%s).'
114 % filter_file_name) 114 % filter_file_name)
115 115
116 new_failed_tests = [] 116 new_failed_tests = []
117 if failed_tests: 117 if failed_tests:
118 for test in failed_tests: 118 for test in failed_tests:
119 if test.name not in disabled_tests: 119 if test.name not in disabled_tests:
120 new_failed_tests.append(test.name) 120 new_failed_tests.append(test.name)
121 121
122 if not new_failed_tests: 122 if not new_failed_tests:
123 if os.path.exists(filter_file_name): 123 if os.path.exists(filter_file_name):
124 os.unlink(filter_file_name) 124 os.unlink(filter_file_name)
125 return 125 return
126 126
127 filter_file = file(filter_file_name, 'w') 127 filter_file = file(filter_file_name, 'w')
128 if self._running_on_emulator: 128 if self._running_on_emulator:
129 filter_file.write('# Addtional list of suppressions from emulator\n') 129 filter_file.write('# Addtional list of suppressions from emulator\n')
130 else: 130 else:
131 filter_file.write('# List of suppressions\n') 131 filter_file.write('# List of suppressions\n')
132 filter_file.write("""This file was automatically generated by run_tests.py 132 filter_file.write('# This file was automatically generated by %s\n'
133 """) 133 % sys.argv[0])
134 filter_file.write('\n'.join(sorted(new_failed_tests))) 134 filter_file.write('\n'.join(sorted(new_failed_tests)))
135 filter_file.write('\n') 135 filter_file.write('\n')
136 filter_file.close() 136 filter_file.close()
137 137
138 def GetDataFilesForTestSuite(self): 138 def GetDataFilesForTestSuite(self):
139 """Returns a list of data files/dirs needed by the test suite.""" 139 """Returns a list of data files/dirs needed by the test suite."""
140 # Ideally, we'd just push all test data. However, it has >100MB, and a lot 140 # Ideally, we'd just push all test data. However, it has >100MB, and a lot
141 # of the files are not relevant (some are used for browser_tests, others for 141 # of the files are not relevant (some are used for browser_tests, others for
142 # features not supported, etc..). 142 # features not supported, etc..).
143 if self.test_package.test_suite_basename in ['base_unittests', 143 if self.test_package.test_suite_basename in ['base_unittests',
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 def TearDown(self): 300 def TearDown(self):
301 """Cleans up the test enviroment for the test suite.""" 301 """Cleans up the test enviroment for the test suite."""
302 self.test_package.tool.CleanUpEnvironment() 302 self.test_package.tool.CleanUpEnvironment()
303 if self.test_package.cleanup_test_files: 303 if self.test_package.cleanup_test_files:
304 self.adb.RemovePushedFiles() 304 self.adb.RemovePushedFiles()
305 if self.dump_debug_info: 305 if self.dump_debug_info:
306 self.dump_debug_info.StopRecordingLog() 306 self.dump_debug_info.StopRecordingLog()
307 if self.test_package.performance_test: 307 if self.test_package.performance_test:
308 self.adb.TearDownPerformanceTest() 308 self.adb.TearDownPerformanceTest()
309 super(SingleTestRunner, self).TearDown() 309 super(SingleTestRunner, self).TearDown()
OLDNEW
« no previous file with comments | « build/android/run_tests.py ('k') | build/android/test_package_executable.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698