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

Side by Side Diff: build/android/pylib/perf/setup.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 """Generates test runner factory and tests for performance tests.""" 5 """Generates test runner factory and tests for performance tests."""
6 6
7 import json 7 import json
8 import fnmatch 8 import fnmatch
9 import logging
9 import os 10 import os
11 import psutil
12 import signal
10 import shutil 13 import shutil
14 import time
11 15
12 from pylib import constants 16 from pylib import constants
13 from pylib import forwarder 17 from pylib import forwarder
14 from pylib.perf import test_runner
15 from pylib.utils import test_environment 18 from pylib.utils import test_environment
16 19
20 import test_runner
21
17 22
18 def Setup(test_options): 23 def Setup(test_options):
19 """Create and return the test runner factory and tests. 24 """Create and return the test runner factory and tests.
20 25
21 Args: 26 Args:
22 test_options: A PerformanceOptions object. 27 test_options: A PerformanceOptions object.
23 28
24 Returns: 29 Returns:
25 A tuple of (TestRunnerFactory, tests). 30 A tuple of (TestRunnerFactory, tests).
26 """ 31 """
(...skipping 25 matching lines...) Expand all
52 sorted_test_names = fnmatch.filter(sorted_test_names, 57 sorted_test_names = fnmatch.filter(sorted_test_names,
53 test_options.test_filter) 58 test_options.test_filter)
54 tests_dict = dict((k, v) for k, v in tests_dict.iteritems() 59 tests_dict = dict((k, v) for k, v in tests_dict.iteritems()
55 if k in sorted_test_names) 60 if k in sorted_test_names)
56 61
57 flaky_steps = [] 62 flaky_steps = []
58 if test_options.flaky_steps: 63 if test_options.flaky_steps:
59 with file(test_options.flaky_steps, 'r') as f: 64 with file(test_options.flaky_steps, 'r') as f:
60 flaky_steps = json.load(f) 65 flaky_steps = json.load(f)
61 66
62 def TestRunnerFactory(device, _shard_index): 67 def TestRunnerFactory(device, shard_index):
63 return test_runner.TestRunner( 68 return test_runner.TestRunner(
64 test_options, device, tests_dict, flaky_steps) 69 test_options, device, tests_dict, flaky_steps)
65 70
66 return (TestRunnerFactory, sorted_test_names) 71 return (TestRunnerFactory, sorted_test_names)
OLDNEW
« no previous file with comments | « build/android/pylib/monkey/setup.py ('k') | build/android/pylib/perf/surface_stats_collector.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698