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

Unified Diff: scripts/slave/unittests/recipe_simulation_test.py

Issue 1111413005: Some changes to allow recipes and modules to live noncentrally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Review comments Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/slave/unittests/recipe_lint.py ('k') | scripts/tools/show_me_the_modules.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/unittests/recipe_simulation_test.py
diff --git a/scripts/slave/unittests/recipe_simulation_test.py b/scripts/slave/unittests/recipe_simulation_test.py
index dba2d09b8257bc98e018159cd333c0b5036b8819..109b16bcad4e54a47492554a63843997e5179110 100755
--- a/scripts/slave/unittests/recipe_simulation_test.py
+++ b/scripts/slave/unittests/recipe_simulation_test.py
@@ -20,12 +20,17 @@ from slave import recipe_util
import expect_tests # pylint: disable=W0403
+UNIVERSE = recipe_loader.RecipeUniverse()
+
+
def RunRecipe(test_data):
stream = annotator.StructuredAnnotationStream(stream=open(os.devnull, 'w'))
recipe_config_types.ResetTostringFns()
# TODO(iannucci): Only pass test_data once.
result = annotated_run.run_steps(stream, test_data.properties,
- test_data.properties, test_data)
+ test_data.properties,
+ UNIVERSE,
+ test_data)
return expect_tests.Result(list(result.steps_ran.values()))
@@ -37,6 +42,7 @@ def test_gen_coverage():
[os.path.join(x, '*', 'test_api.py') for x in recipe_util.MODULE_DIRS()]
)
+
@expect_tests.covers(test_gen_coverage)
def GenerateTests():
cover_mods = []
@@ -45,8 +51,8 @@ def GenerateTests():
cover_mods.append(os.path.join(mod_dir_base, '*', '*.py'))
for recipe_path, recipe_name in recipe_loader.loop_over_recipes():
- recipe = recipe_loader.load_recipe(recipe_name)
- test_api = recipe_loader.create_test_api(recipe.DEPS)
+ recipe = UNIVERSE.load_recipe(recipe_name)
+ test_api = recipe_loader.create_test_api(recipe.LOADED_DEPS, UNIVERSE)
covers = cover_mods + [recipe_path]
« no previous file with comments | « scripts/slave/unittests/recipe_lint.py ('k') | scripts/tools/show_me_the_modules.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698