5 Commits

Author SHA1 Message Date
Doug Hellmann
4bff2d214d remove optimization for values unchanged from the branch
When a requirement setting is changed, require that all requirements
follow the rules.

Without this change, it is possible to partially update the dependency
list for a project in a way that leaves some of the dependencies out
of compliance. With this change, all dependencies must be compliant in
order to update any of them.

Change-Id: I154245339a36618ac2e9a5922bc37121d44bca29
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-10 11:18:16 -04:00
Doug Hellmann
1e78c97426 add validation rules for lower constraints
The requirement lower bound and lower-constraints.txt value must
match.

The lower-constraints.txt value must be compatible with the specified
range, including exclusions.

If there is no lower-constraints.txt file the additional tests are
skipped.

If no minimum is specified, the misconfiguration is left to the other
validation logic to catch.

Only files associated with test jobs are checked because other jobs
are not run with the lower constraints list.

Change-Id: Iefe3ef8a89e965537486a1c9a62ab887b4401530
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-29 12:58:57 -04:00
Doug Hellmann
f1eca36019 allow project requirements to diverge at the lower bounds
Replace the exact match check for requirements with one that ensures
that the exclusion set specified is a subset of any exclusions used in
the global requirements list. This allows the lower bounds in a
project to diverge from the value used in other projects (and the
global list) while still ensuring that the allowed set of values is
the same.

We treat a cap (<version) as an exclusion because we want to allow
caps but we don't want them to be different from what we have in
global-requirements.

Change-Id: Ic2355cf6ca15380025d76dacffcf917c3929d40c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-27 15:24:11 -04:00
Doug Hellmann
ae899937df more tests for the validation logic
Refactor the validation logic so we can test one rule at a time, then
write those tests.

Change-Id: I2250f451d92414d0003679d85b38aebbdf8bd3c9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-27 15:24:05 -04:00
Doug Hellmann
3a378a6c57 rearrange requirements check code to add tests
Rearrange and refactor the existing requirements check logic to better
support testing.  Add a few tests for the function that determines if
a setting matches the global requirements.

Change-Id: I3ea9049cf728b11ef71ca180304ee7041303a409
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-27 15:20:14 -04:00