| 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)
|
|
|