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

Unified Diff: scripts/slave/recipe_modules/generator_script/example.py

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: License headers Created 7 years, 3 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/recipe_modules/generator_script/example.py
diff --git a/scripts/slave/recipe_modules/generator_script/example.py b/scripts/slave/recipe_modules/generator_script/example.py
index 87c43ab035b2dceda8e64a702202c944d9262412..c7ca2302b9868efe32fd06af782a711bf132ef9e 100644
--- a/scripts/slave/recipe_modules/generator_script/example.py
+++ b/scripts/slave/recipe_modules/generator_script/example.py
@@ -14,20 +14,15 @@ def GenSteps(api):
yield api.generator_script('bogus.py')
-def GenTests(_api):
- yield 'basic', {
- 'step_mocks': {
- 'gen step(bogus)': {
- 'json': {
- 'output': [{'name': 'mock.step.binary',
- 'cmd': ['echo', 'mock step binary']}]
- }
- },
- 'gen step(bogus.py)': {
- 'json': {
- 'output': [{'name': 'mock.step.python',
- 'cmd': ['echo', 'mock step python']}]
- }
- }
- }
- }
+def GenTests(api):
+ yield (
+ api.test('basic') +
+ api.generator_script(
+ 'bogus',
+ {'name': 'mock.step.binary', 'cmd': ['echo', 'mock step binary']}
+ ) +
+ api.generator_script(
+ 'bogus.py',
+ {'name': 'mock.step.python', 'cmd': ['echo', 'mock step python']}
+ )
+ )
« no previous file with comments | « scripts/slave/recipe_modules/generator_script/api.py ('k') | scripts/slave/recipe_modules/generator_script/test_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698