Makefile: build ginkgo before running localunit - #29357
Open
Animesh-Parashar wants to merge 1 commit into
Open
Conversation
Signed-off-by: Animesh Parashar <animeshparashar3439@gmail.com>
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
On a fresh clone
make localunitfails on clean checkoutThe current recipe runs
$(GINKGO)which is./bin/ginkgobut the target only declarestest/goecho/goechoandtest/version/versionas prereq. Nothing builds ginkgo, so on a fresh clone the binary is missing./bin/is gitignored, so it is never checked in.The other three targets that use ginkgo all declare
.install.ginkgo:ginkgo-run(line 695),testbindings(715) andsystem.test-binary(766).localunitis the only one that does not.But
hack/ci/runner.shalready works around this:This makes that first line unnecessary.
I used a file target rather than adding
.install.ginkgoto the prerequisite list, because.install.ginkgois.PHONYand would rebuild on every invocation. That matters here:run_unitrunslocalunitunder sudo, so an unconditional rebuild would produce a root-ownedbin/ginkgo. With a file target, make skips the build when the binary is present, which I checked withmake -non a warm tree (no rebuild commands emitted).With the fix, ginkgo builds and 64 suites run. 63 pass. The one failure is
pkg/machine/provider TestBadInstalledProviders, which needsqemu-system-x86_64that I do not have installed locally, and is unrelated to this change.make validateprpasses.