The alias for vendor/github.com/onsi/ginkgo/ginkgo ensures that code like
30e99cb2a9/experiment/kind-conformance-image-e2e.sh (L110)
continues to work. The one without "vendor/" is there just in case that it
was used because it also worked.
Long term, "ginkgo" is a nicer, version independent alias. It gets used
internally to avoid future churn and gets documented also publicly in the
Makefile help.
The caveat is that there's no guarantee that a future v3 CLI will be compatible
with current invocations. But the most common usage is through
hack/ginkgo-e2e.sh, which can deal with such differences.
This commit cleans up references to the old kubernetes-node-e2e-images
project. In the process it removes the `LIST_IMAGES` mode as listing
large numbers of public cloud projects is not particularly useful, and
has been somewhat broken for a long period of time - as we defaulted
launching a VM to a different project than listing.
Make's "define" feature (macros) is subtle and it took me a long time to
convince myself this all works. In particular, we (prior to this commit)
are terribly inconsistent about the use of `$` vs `$$`. We mostly get
away with it because the "variables" are more like "constants", but the
inconsistency trips up some things. For example, using `$(shell)`
inside a macro will run at macro expansion time rather than when the
resulting make code is executed.
For a contrived, but concrete example, derived from our Makefile:
```
define MACRO
ifeq ($(DBG),1)
$(warning dbg is $(DBG))
endif
endef # macro
TGTS=a b c
$(foreach pfx, $(TGTS), $(eval $(MACRO)))
default:
@echo $@
```
yields:
```
$ make
Makefile:8: dbg is
Makefile:8: dbg is
Makefile:8: dbg is
default
$ make DBG=1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
default
```
This is because `$(warning)` is evaluated as the macro is expanded.
Replace that with `$(shell)` and you can see how you might end up
running a bunch of things you didn't need to run. The fix is:
```
define MACRO
ifeq ($(DBG),1)
$$(warning dbg is $$(DBG))
endif
endef # macro
TGTS=a b c
$(foreach pfx, $(TGTS), $(eval $(MACRO)))
default:
@echo $@
```
which yields:
```
$ make
default
$ make DBG=1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
Makefile:8: dbg is 1
default
```
We COULD have only changed `$(warning)` to `$$(warning)` and left
`$(DBG)` alone, because that's a cheap expansion. I chose NOT to do
that here because it requires brainpower to think about this all, and it
seems easier to set a simple rule: inside a `define`/`endef` block, you
always use `$$` unless you KNOW that you NEED expansion-time evaluation
(as in the `$(prefix)` in this commit, which is effectively an argument
to the macros).
Only build and run go2make on the first pass. If that generates a new
GO_PKGDEPS_FILE, make will restart the whole process and set MAKE_RESTARTS to
a numeric value.
We can use this to avoid re-running go2make, which saves a few seconds
each build.
Since removing dockershim, `make test-e2e-node` will fail by default as
there is no provided container runtime endpoint.
This commit defaults us to using containerd's default socket path as the
local test target, rather than failing hard.
Right now, `run_remote.go` only supports GCE instances. But actually
running the tests is completely independent of GCE and could work just
as well on any SSH-accessible machine.
This patch adds a new `--mode` switch, which defaults to `gce` for
backwards compatibility, but can be set to `ssh`. In that mode, the GCE
API is not used at all, and we simply connect to the hosts given via
`--hosts`.
This is still better than `run_local.go` because the latter mixes build
environment with test environment, which doesn't fit well with
container-optimized operating systems.
This is part of an effort to setup the e2e node tests on Fedora CoreOS
(see https://github.com/coreos/fedora-coreos-tracker/issues/990).
Patch best viewed with whitespace ignored.
This enables building the conformance image when running `make
cross-in-a-container`, which is being used by the release engineering
tooling.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>