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

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: Little bitty cleanup Created 5 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 side-by-side diff with in-line comments
Download patch
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..b6ad37a98d3706f97ccd994397a3bd3f69746e37 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
+LOADER = recipe_loader.ModuleLoader()
+
+
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,
+ LOADER,
+ 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 = recipe_loader.load_recipe(recipe_name, LOADER)
+ test_api = recipe_loader.create_test_api(recipe.LOADED_DEPS, LOADER)
covers = cover_mods + [recipe_path]

Powered by Google App Engine
This is Rietveld 408576698