| Index: recipes.py
|
| diff --git a/recipes.py b/recipes.py
|
| index 7455f6f0e20c4d4b3b1c22bb3cbef10da666f038..302dae168118248c66c2848ec2a80de3f0e5da73 100755
|
| --- a/recipes.py
|
| +++ b/recipes.py
|
| @@ -64,6 +64,32 @@ def simulation_test(package_deps, args, op_args):
|
| engine_flags=op_args.engine_flags)
|
|
|
|
|
| +def simulation_test_ng(package_deps, args, op_args):
|
| + try:
|
| + from recipe_engine import simulation_test_ng
|
| + except ImportError:
|
| + logging.error(
|
| + 'Error while importing testing libraries. You may be missing the pip'
|
| + ' package "coverage". Install it, or use the --use-bootstrap command'
|
| + ' line argument when calling into the recipe engine, which will install'
|
| + ' it for you.')
|
| + raise
|
| +
|
| + from recipe_engine import loader
|
| + from recipe_engine import package
|
| +
|
| + _, config_file = get_package_config(args)
|
| + universe = loader.RecipeUniverse(package_deps, config_file)
|
| + universe_view = loader.UniverseView(universe, package_deps.root_package)
|
| +
|
| + # Prevent flakiness caused by stale pyc files.
|
| + package.cleanup_pyc(package_deps.root_package.recipes_dir)
|
| +
|
| + return simulation_test_ng.main(
|
| + universe_view, raw_args=args.args,
|
| + engine_flags=op_args.engine_flags)
|
| +
|
| +
|
| def lint(package_deps, args):
|
| from recipe_engine import lint_test
|
| from recipe_engine import loader
|
| @@ -429,6 +455,12 @@ def main():
|
| simulation_test_p.set_defaults(command='simulation_test')
|
| simulation_test_p.add_argument('args')
|
|
|
| + simulation_test_ng_p = subp.add_parser(
|
| + 'simulation_test_ng',
|
| + description='Generate or check expectations by simulation (EXPERIMENTAL)')
|
| + simulation_test_ng_p.set_defaults(command='simulation_test_ng')
|
| + simulation_test_ng_p.add_argument('args', nargs=argparse.REMAINDER)
|
| +
|
| lint_p = subp.add_parser(
|
| 'lint',
|
| description='Check recipes for stylistic and hygenic issues')
|
| @@ -667,6 +699,8 @@ def _real_main(args, op_args):
|
| return 0
|
| if args.command == 'simulation_test':
|
| return simulation_test(package_deps, args, op_args)
|
| + elif args.command == 'simulation_test_ng':
|
| + return simulation_test_ng(package_deps, args, op_args)
|
| elif args.command == 'bundle':
|
| return bundle(package_deps, args)
|
| elif args.command == 'lint':
|
|
|