This is an archive of the discontinued LLVM Phabricator instance.

ClangBuilder: Use list of checks instead of boolean. NFCI
ClosedPublic

Authored by rovka on Feb 28 2022, 3:19 AM.

Details

Summary

Modify getClangCMakeBuildFactory and getClangCMakeGCSBuildFactory
to take as input a list of checks instead of a boolean. This makes it possible
to run subsets of the tests and is similar to the pattern used by the
UnifiedTreeBuilder.

Diff Detail

Event Timeline

rovka requested review of this revision.Feb 28 2022, 3:19 AM
rovka created this revision.
gkistanova requested changes to this revision.Feb 28 2022, 9:40 AM

Thanks, Diana!

List of checks is a good idea.

zorg/buildbot/builders/ClangBuilder.py
75

Please do not use mutable objects as defaults. Instead make it None and handle that in the body as the trigger to set a default value.

https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments

136

Ditto.

186

Ditto.

_getClangCMakeBuildFactory seems the right place to implement that “default check-all” logic.

297

Just for a better UX you may want each check to be a separate build step, if multiple specified. Not a stopper for this patch.

This revision now requires changes to proceed.Feb 28 2022, 9:40 AM
rovka updated this revision to Diff 412009.Mar 1 2022, 1:36 AM

Thanks, I updated it to use None as a default.
Separate steps for each set of checks sounds like a good idea. Maybe we can add that when we actually have a buildbot that runs at least 2 sets of checks (hopefully this one, in the near future).

gkistanova accepted this revision.Mar 1 2022, 8:36 AM

Thanks, Diana!
LGTM.

This revision is now accepted and ready to land.Mar 1 2022, 8:36 AM
This revision was landed with ongoing or failed builds.Mar 2 2022, 1:40 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 1:40 AM