This patch moves the RHEL buildbot back to clang factory with the cmake option implemented.
The patch was tested locally with a test buildmaster server. The patch also makes sure lld is enabled.
Details
Diff Detail
- Repository
- rZORG LLVM Github Zorg
Event Timeline
What is the reason of moving back to clang builder? Looks like we need to add the cmake test-suite for ClangBuilder here as well. Any particular reason that we can not add it as an optional step in UnifiedTreeBuilder?
The Unified Tree builder did not have a test suite step, so it was easier to use cmake clang builder which already have a test suite step for us to take advantage of.
The Unified Tree builder did not have a test suite step, so it was easier to use cmake clang builder which already have a test suite step for us to take advantage of.
OK ... Thanks.
But since we have to add the cmake steps anyhow, the only difference is about source checkout, which should be easy in Unified Tree as well?
Anyway, let us see what is Galina's comments about this first.
I did initially look into adding this step into unified tree builder, although ran into a bit more problems with the variables and stuff. I'm sure I can figure it out if that is what we much prefer, although personally I don't see a big benefit unified tree builder may have over cmake clang builder.
I'm sure I can figure it out if that is what we much prefer, although personally I don't see a big benefit unified tree builder may have over cmake clang builder.
Thanks! My understanding is that UnifiedTreeBuilder is the builder that the community want to promote , especially for all future new builders.
If we extend the UnifiedTreeBuilder, it may be easier for others to add test-suites into their builders.
Could you also please update the patch with full context?
buildbot/osuosl/master/config/builders.py | ||
---|---|---|
642 | Unrelated change? |
Changed implementation to UnifiedTreeBuilder. I kept the clang factory builder implementation too in case that could be useful to others, but can be removed if we think it's not necessary.
Thanks for the great job. Some more feedback regarding UnifiedTreeBuilder extension. Thanks!
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
---|---|---|
248 ↗ | (On Diff #369785) | obj_dir -> maybe compiler_dir is better? and then we don't need compiler_path assignment anymore. |
249 ↗ | (On Diff #369785) | targets, checks, install_dir , stage_name are not used at all in testsuite step. Can we remove them. |
260 ↗ | (On Diff #369785) | test_suite_dir -> test_suite_src_dir? |
271 ↗ | (On Diff #369785) | What is the reason that we choose Makefiles instead of Ninja? UnifiedTree default to use Ninja to build clang, so I think it would be great if we can align with it (so that we don't need to require both ninja and make in buildbot machines. |
273 ↗ | (On Diff #369785) | Do we need the full path defined above as lit = utils.Interploate.. instead of using the one in path? |
276 ↗ | (On Diff #369785) | It would be great if we can make the -k and -j20 as parameters instead of hardcoding here, so that users can configure for their buildbots. If we use Ninja, I don't think we need the -j20 anymore. |
280 ↗ | (On Diff #369785) | Should we use LitTestCommand and pass through env and **kwargs ? |
283 ↗ | (On Diff #369785) | Maybe add a test-suite-wordir = utils.Interpolate(...) above and use them here in all steps? |
377 ↗ | (On Diff #369785) | nit: ident is off for f? |
Thanks for the suggestions @jsji , I think this should address all of your comments.
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
---|---|---|
280 ↗ | (On Diff #369785) | For this comment, I found that it seems to work without env and kwargs, so I'm wondering if it's preferred for us to not pass it if we don't need it or if we should pass it anyways. |
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
---|---|---|
280 ↗ | (On Diff #369785) | should pass it anyways so that others may try to pass additional env/args to control the tests in their buildbots. |
LGTM with some nits. Thanks for working on this!
buildbot/osuosl/master/config/builders.py | ||
---|---|---|
629 | Just to double confirm that you have tested 96 in our buildbot? Wanna to make sure we don't set it too large . | |
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
246 ↗ | (On Diff #370488) | llvm_srcdir is not used , can we remove it. |
257 ↗ | (On Diff #370488) | Add test_suite_workdir='test/sandbox/test-suite', |
267 ↗ | (On Diff #370488) | workdir= `test_suite_workdir`. |
276 ↗ | (On Diff #370488) | workdir= `test_suite_workdir`. |
281 ↗ | (On Diff #370488) | workdir= `test_suite_workdir`. |
282 ↗ | (On Diff #370488) | -j20? But yeah, this is small enhancement, can be done in a follow up patch. Thanks. |
buildbot/osuosl/master/config/builders.py | ||
---|---|---|
629 | yup! tested on our buildbot machine | |
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
282 ↗ | (On Diff #370488) | I agree with this, although I'm not actually quite sure how to do this. I'll look into it a bit more; if I can't figure it out today I'll leave it for a future patch. Would also appreciate any input and concerns you might have @gkistanova. Thank you! |
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
---|---|---|
273 ↗ | (On Diff #371172) | Do you mean: |
zorg/buildbot/builders/UnifiedTreeBuilder.py | ||
---|---|---|
342 ↗ | (On Diff #371333) | Looks OK for me. Thanks. |
Hello everyone.
Sorry for being late to the discussion.
Unless I'm missing something, we are here after 2 stages: (1) build the compiler and tools, and then (2) build and run LLVM test-suite by using just built compiler and tools.
It doesn't seem extending either UnifiedTreeBuilder or ClangBuilder by adding extra parameters and if-else logic looks good, with all due respect to the work already done in this review.
How about introducing a new TestSuiteBuilder instead, which would use UnifiedTreeBuilder to do the stage 1 (configure,build+unit tests), and then add missing test-suite checkout, configuration, build and run step? Should be a nice clean build factory. Something similar to how this is done in zorg/buildbot/builders/ABITestsuitBuilder.py should do.
What do you think?
How about introducing a new TestSuiteBuilder instead, which would use UnifiedTreeBuilder to do the stage 1 (configure,build+unit tests), and then add missing test-suite checkout, configuration, build and run step? Should be a nice clean build factory. Something similar to how this is done in zorg/buildbot/builders/ABITestsuitBuilder.py should do.
What do you think?
test-suite test should be quite common and can be similar to lit test, that is why we extending ClangBuilder/UnifiedTreeBuilder to do it.
The TestsuiteBuilder proposal treats test-suite as *out of tree* repo/test instead, but yeah, that is not a big deal , OK to me.
Thanks for the feedback.
Are we talking about the same test-suite?
https://github.com/llvm/llvm-test-suite is out of tree.
I'm happy to reimplement this as a separate builder; would you like me to revert the commit or is it alright for me to have the other builder implemented and revert the changes in that commit as well?
Hi Albion,
I think you can keep the UnifiedTreeBuilder changes till you are ready with the new build factory and can switch the builder, then revert.
But please revert the ClangBuilder changes before some will start using that.
Another option is reverting the commit, and temporarily staging your patch for UnifiedTreeBuilder.
Sorry again for being late with the feedback and thanks for your patience.
I'll go ahead and revert the commit so that no one goes and use these options. Thanks!
Just to double confirm that you have tested 96 in our buildbot? Wanna to make sure we don't set it too large .