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

Side by Side Diff: scripts/slave/unittests/recipe_simulation_test.py

Issue 225633007: Upgrade to coverage 3.7.1 and have it auto-build itself on first use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: sigh our imports are a mess Created 6 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 | « scripts/slave/unittests/recipe_configs_test.py ('k') | scripts/slave/unittests/test_env.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Provides simulator test coverage for individual recipes.""" 6 """Provides simulator test coverage for individual recipes."""
7 7
8 import os 8 import os
9 9
10 # Importing for side effects on sys.path? Yes... yes we are :( 10 # Importing for side effects on sys.path? Yes... yes we are :(
11 import test_env # pylint: disable=W0611 11 import test_env # pylint: disable=W0611,W0403
12 12
13 from common import annotator 13 from common import annotator
14 from slave import annotated_run 14 from slave import annotated_run
15 from slave import recipe_config_types 15 from slave import recipe_config_types
16 from slave import recipe_loader 16 from slave import recipe_loader
17 from slave import recipe_util 17 from slave import recipe_util
18 18
19 import expect_tests 19 import expect_tests # pylint: disable=W0403
20 20
21 21
22 def RunRecipe(test_data): 22 def RunRecipe(test_data):
23 stream = annotator.StructuredAnnotationStream(stream=open(os.devnull, 'w')) 23 stream = annotator.StructuredAnnotationStream(stream=open(os.devnull, 'w'))
24 recipe_config_types.ResetTostringFns() 24 recipe_config_types.ResetTostringFns()
25 # TODO(iannucci): Only pass test_data once. 25 # TODO(iannucci): Only pass test_data once.
26 result = annotated_run.run_steps(stream, test_data.properties, 26 result = annotated_run.run_steps(stream, test_data.properties,
27 test_data.properties, test_data) 27 test_data.properties, test_data)
28 return expect_tests.Result([s.step for s in result.steps_ran.itervalues()]) 28 return expect_tests.Result([s.step for s in result.steps_ran.itervalues()])
29 29
(...skipping 19 matching lines...) Expand all
49 ) 49 )
50 50
51 51
52 if __name__ == '__main__': 52 if __name__ == '__main__':
53 expect_tests.main('recipe_simulation_test', GenerateTests, ( 53 expect_tests.main('recipe_simulation_test', GenerateTests, (
54 [os.path.join(x, '*') for x in recipe_util.RECIPE_DIRS()] + 54 [os.path.join(x, '*') for x in recipe_util.RECIPE_DIRS()] +
55 [os.path.join(x, '*', '*api.py') for x in recipe_util.MODULE_DIRS()] 55 [os.path.join(x, '*', '*api.py') for x in recipe_util.MODULE_DIRS()]
56 ), ( 56 ), (
57 [os.path.join(x, '*', '*config.py') for x in recipe_util.MODULE_DIRS()] 57 [os.path.join(x, '*', '*config.py') for x in recipe_util.MODULE_DIRS()]
58 )) 58 ))
OLDNEW
« no previous file with comments | « scripts/slave/unittests/recipe_configs_test.py ('k') | scripts/slave/unittests/test_env.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698