Add common_checks dir and call from checker.

- Checker attempts to discover checks in 3 places:
1. common_checks dir.
2. Project repo.
3. Program repo.

- Add basic ConstraintSuite that checks ids are
consistent as an example.

- Right now just fail a check by throwing an
error and do basic logging when a check is run.
Logging and failure handling can be improved in
the future.

- Also added an exclude_pattern arg to
discover_suites to allow excluding tests. If tests
import a constraint suite, the suite would be
defined twice, and run twice.

BUG=chromium:1051187
TEST=payload_utils/checker.py \
--program ../program/volteer \
--project ../project/volteer/volteer
TEST=python unittests

Change-Id: Ida593429f5bbb85d23027db7db27f4f2f1e3f781
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/config/+/2056867
Commit-Queue: Andrew Lamb <andrewlamb@chromium.org>
Tested-by: Andrew Lamb <andrewlamb@chromium.org>
Reviewed-by: David Burger <dburger@chromium.org>
10 files changed
tree: 716aceb96a10673b0117bd8d6d3b64d0a0d54ed2
  1. .gitignore
  2. .style.yapf
  3. generate.sh
  4. payload_utils/
  5. presubmit/
  6. proto/
  7. util/