commit | c59fbd73ac80bedc701d492ad51aa02234d3bcdd | [log] [tgz] |
---|---|---|
author | Garrett Beaty <gbeaty@chromium.org> | Fri Nov 06 01:32:54 2020 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 06 01:32:54 2020 |
tree | 064c2f30bc2c927a46c3cc76c4b9eb10615ad09b | |
parent | 042b0bd58e8984a5851d5a75940ee13344a2eb95 [diff] |
Modify required attributes to not need to appear before optional. This will enable the creation of test spec types for each test type that accurately indicate required fields. For example ScriptTest requires that the script value be provided. This wouldn't be possible to declare using the standard behavior no default behavior because it would appear on a spec type that inherits from the base spec type which will have optional attributes. That would require a workaround of accepting a None default and customizing the create method to require the parameter. Bug: 1128746 Change-Id: I41ce870d695a83451312db60ff68183e1e233e48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2518000 Commit-Queue: Garrett Beaty <gbeaty@chromium.org> Reviewed-by: Stephen Martinis <martiniss@chromium.org>
If you're here to make a change to ‘recipes’ (the code located in scripts/slave/recipes*
), please take a look at the README for more information pertaining to recipes.
The preferred style is PEP8 with two-space indent; that is, the Chromium Python style. Functions use lowercase_with_underscores
, with the exception of the special functions RunSteps
and RunTests
in recipes. Use yapf (git cl format --no-clang-format
) to autoformat new code.