Use new recipes.py test command

Bug: skia:
Change-Id: I669e96bb62ce7c91ef40f48d01bca55128db5016
Reviewed-on: https://skia-review.googlesource.com/13688
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
This commit is contained in:
Eric Boren 2017-04-18 09:15:53 -04:00 committed by Skia Commit-Bot
parent 7a17b2ffab
commit a0481b9f3f
4 changed files with 12 additions and 12 deletions

View File

@ -33,11 +33,11 @@ def python_unit_tests(train):
INFRA_BOTS_DIR)
def recipe_simulation_test(train):
def recipe_test(train):
cmd = [
'python', os.path.join(INFRA_BOTS_DIR, 'recipes.py'), 'simulation_test']
'python', os.path.join(INFRA_BOTS_DIR, 'recipes.py'), 'test', 'run']
if train:
cmd.append('train')
cmd.append('--train')
return test(cmd, SKIA_DIR)
@ -63,7 +63,7 @@ def main():
tests = (
python_unit_tests,
recipe_simulation_test,
recipe_test,
gen_tasks_test,
)
errs = []

View File

@ -19,7 +19,7 @@ infra/bots/recipes). They are all Skia-specific and some are interrelated:
When you change a recipe module, you generally need to re-train the simulation
test:
$ python infra/bots/recipes.py simulation_test train
$ python infra/bots/recipes.py test run --train
Or:
@ -32,4 +32,4 @@ Each recipe module contains a few files:
recipe modules on which this module depends.
* example.py - Optional, this file contains examples which demonstrate how to
use the module and should contain enough tests to achieve 100% coverage
for the module. The tests are run using the simulation_test command above.
for the module. The tests are run using the recipes test command above.

View File

@ -102,7 +102,7 @@ def find_engine_override(argv):
any, or None if the user didn't override it."""
PREFIX = 'recipe_engine='
p = argparse.ArgumentParser()
p = argparse.ArgumentParser(add_help=False)
p.add_argument('-O', '--project-override', action='append')
args, _ = p.parse_known_args(argv)
for override in args.project_override or ():

View File

@ -13,13 +13,13 @@ key/value pairs in the command.
When you change a recipe, you generally need to re-train the simulation test:
$ python infra/bots/recipes.py simulation_test train
$ python infra/bots/recipes.py test run --train
Or:
$ cd infra/bots; make train
The simulation_test generates expectations files for the tests contained within
each recipe which illustrate which steps would run, given a particular set of
inputs. Pay attention to the diffs in these files when making changes to ensure
that your change has the intended effect.
The test generates expectations files for the tests contained within each
recipe which illustrate which steps would run, given a particular set of inputs.
Pay attention to the diffs in these files when making changes to ensure that
your change has the intended effect.