-
Notifications
You must be signed in to change notification settings - Fork 161
Commit 75a37cb
committed
dashboard: refactor mechanism for adjusting cmd/dist test policy
Previously, the behavior of ShouldRunDistTest could be overridden
by an individual builder by setting a the shouldRunDistTest field
to a custom policy implementation.
A pitfall of this approach is that it requires each custom policy
to reimplement the default cmd/dist test policy as well. If that
isn't done when attempting to make a small adjustment to the default
policy, the result is that the default policy is ignored.
The fasterTrybots policy, as the name suggests, exists to skip some
tests in trybot mode. Due to the problem above, it was causing some
builders to run more tests in trybot mode than they would if it
weren't applied. For example, the freebsd-amd64-12_0 builder should
have been skipping the "api" test in trybot mode, but wasn't.
This refactor fixes that by modifying the approach for how individual
builders can customize the cmd/dist test behavior. Now, a function
distTestAdjust is called with the first parameter specifying the
default policy decision. That function can adjust the decision as it
sees fit, but otherwise it preserves its initial value in situations
where no change is intended to be made.
For golang/go#38279.
Change-Id: I220248f51abfc8e77195ae0c9134a17f7cac9bc2
Reviewed-on: https://go-review.googlesource.com/c/build/+/227777
Reviewed-by: Alexander Rakoczy <[email protected]>1 parent 6825d11 commit 75a37cbCopy full SHA for 75a37cb
2 files changed
+229
-207
lines changed
0 commit comments