blob: 9cfe7fc5a0dce17f8a40dac0dd3375457eacde53 [file] [log] [blame]
from recipe_engine import post_process
from PB.recipe_modules.dart.build.build import Build
DEPS = [
'build',
'recipe_engine/properties',
'recipe_engine/step',
]
def RunSteps(api):
gn_args = ['--super-fast']
api.build.gn(name='gn it', args=gn_args)
def GenTests(api):
yield api.test(
'success',
api.post_process(post_process.StatusSuccess),
)
yield api.test(
'no-goma',
api.properties(**{'$dart/build':Build(disable_goma=True)}),
api.post_process(post_process.StepCommandContains,
'gn it', [
'--super-fast',
'--no-goma',
]),
api.post_process(post_process.DoesNotRunRE, '.*goma.*'),
api.post_process(post_process.StatusSuccess),
)
yield api.test(
'fail',
api.step_data('gn it', retcode=1),
api.post_process(post_process.StatusFailure),
)