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

Unified Diff: third_party/recipe_engine/simulation_test.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved show_me_the_modules into recipe_engine Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/recipe_engine/simulation_test.py
diff --git a/third_party/recipe_engine/simulation_test.py b/third_party/recipe_engine/simulation_test.py
index 4a9b2cd1869c79bab82d14d01c722c7fd5028d22..07578ed44dd2d64c7a3b171a88048197ac3934a3 100644
--- a/third_party/recipe_engine/simulation_test.py
+++ b/third_party/recipe_engine/simulation_test.py
@@ -74,14 +74,18 @@ def GenerateTests():
)
-def main(universe):
+def main(package_cfg, args=None):
"""Runs simulation tests on a given repo of recipes.
Args:
- universe: a RecipeUniverse to operate on.
+ package_cfg: the path to a recipes.cfg to operate on, or
+ an existing PackageDeps object
+ args: command line arguments to expect_tests
Returns:
Doesn't -- exits with a status code
"""
+ from . import loader
+ from . import package
# annotated_run has different behavior when these environment variables
# are set, so unset to make simulation tests environment-invariant.
@@ -93,6 +97,11 @@ def main(universe):
os.environ.pop(env_var)
global _UNIVERSE
- _UNIVERSE = universe
+ if isinstance(package_cfg, package.PackageDeps):
+ package_deps = package_cfg
+ else:
+ package_deps = package.PackageDeps.create(package_cfg)
+ _UNIVERSE = loader.RecipeUniverse(package_deps)
+
expect_tests.main('recipe_simulation_test', GenerateTests,
- cover_omit=cover_omit())
+ cover_omit=cover_omit(), args=args)

Powered by Google App Engine
This is Rietveld 408576698