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

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

Issue 10836323: Change Android build configurations (step 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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 glob 5 import glob
6 import logging 6 import logging
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from base_test_runner import BaseTestRunner 10 from base_test_runner import BaseTestRunner
(...skipping 13 matching lines...) Expand all
24 test_suite: A specific test suite to run, empty to run all. 24 test_suite: A specific test suite to run, empty to run all.
25 gtest_filter: A gtest_filter flag. 25 gtest_filter: A gtest_filter flag.
26 test_arguments: Additional arguments to pass to the test binary. 26 test_arguments: Additional arguments to pass to the test binary.
27 timeout: Timeout for each test. 27 timeout: Timeout for each test.
28 rebaseline: Whether or not to run tests in isolation and update the filter. 28 rebaseline: Whether or not to run tests in isolation and update the filter.
29 performance_test: Whether or not performance test(s). 29 performance_test: Whether or not performance test(s).
30 cleanup_test_files: Whether or not to cleanup test files on device. 30 cleanup_test_files: Whether or not to cleanup test files on device.
31 tool: Name of the Valgrind tool. 31 tool: Name of the Valgrind tool.
32 shard_index: index number of the shard on which the test suite will run. 32 shard_index: index number of the shard on which the test suite will run.
33 dump_debug_info: Whether or not to dump debug information. 33 dump_debug_info: Whether or not to dump debug information.
34 build_type: 'Release' or 'Debug'.
34 """ 35 """
35 36
36 def __init__(self, device, test_suite, gtest_filter, test_arguments, timeout, 37 def __init__(self, device, test_suite, gtest_filter, test_arguments, timeout,
37 rebaseline, performance_test, cleanup_test_files, tool_name, 38 rebaseline, performance_test, cleanup_test_files, tool_name,
38 shard_index, dump_debug_info, fast_and_loose): 39 shard_index, dump_debug_info, fast_and_loose, build_type):
39 BaseTestRunner.__init__(self, device, tool_name, shard_index) 40 BaseTestRunner.__init__(self, device, tool_name, shard_index, build_type)
40 self._running_on_emulator = self.device.startswith('emulator') 41 self._running_on_emulator = self.device.startswith('emulator')
41 self._gtest_filter = gtest_filter 42 self._gtest_filter = gtest_filter
42 self._test_arguments = test_arguments 43 self._test_arguments = test_arguments
43 self.test_results = TestResults() 44 self.test_results = TestResults()
44 if dump_debug_info: 45 if dump_debug_info:
45 self.dump_debug_info = debug_info.GTestDebugInfo(self.adb, device, 46 self.dump_debug_info = debug_info.GTestDebugInfo(self.adb, device,
46 os.path.basename(test_suite), gtest_filter) 47 os.path.basename(test_suite), gtest_filter)
47 else: 48 else:
48 self.dump_debug_info = None 49 self.dump_debug_info = None
49 self.fast_and_loose = fast_and_loose 50 self.fast_and_loose = fast_and_loose
50 51
52 logging.warning('Test suite: ' + test_suite)
51 if os.path.splitext(test_suite)[1] == '.apk': 53 if os.path.splitext(test_suite)[1] == '.apk':
52 self.test_package = TestPackageApk(self.adb, device, 54 self.test_package = TestPackageApk(self.adb, device,
53 test_suite, timeout, rebaseline, performance_test, cleanup_test_files, 55 test_suite, timeout, rebaseline, performance_test, cleanup_test_files,
54 self.tool, self.dump_debug_info) 56 self.tool, self.dump_debug_info)
55 else: 57 else:
56 self.test_package = TestPackageExecutable( 58 self.test_package = TestPackageExecutable(
57 self.adb, device, 59 self.adb, device,
58 test_suite, timeout, rebaseline, performance_test, cleanup_test_files, 60 test_suite, timeout, rebaseline, performance_test, cleanup_test_files,
59 self.tool, self.dump_debug_info) 61 self.tool, self.dump_debug_info)
60 62
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 self.tool.CleanUpEnvironment() 332 self.tool.CleanUpEnvironment()
331 if self.test_package.cleanup_test_files: 333 if self.test_package.cleanup_test_files:
332 self.adb.RemovePushedFiles() 334 self.adb.RemovePushedFiles()
333 if self.dump_debug_info: 335 if self.dump_debug_info:
334 self.dump_debug_info.StopRecordingLog() 336 self.dump_debug_info.StopRecordingLog()
335 if self.test_package.performance_test: 337 if self.test_package.performance_test:
336 self.adb.TearDownPerformanceTest() 338 self.adb.TearDownPerformanceTest()
337 if self.dump_debug_info: 339 if self.dump_debug_info:
338 self.dump_debug_info.ArchiveNewCrashFiles() 340 self.dump_debug_info.ArchiveNewCrashFiles()
339 super(SingleTestRunner, self).TearDown() 341 super(SingleTestRunner, self).TearDown()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698