mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Makefile: Use the name provided to upload in run
This fixes an issue introduced in the split of push and run. Before this commit, an image could be pushed to a custom location from the presence of the `CLOUDSDK_IMAGE_NAME` variable. The subsquent run would fail as the name `test-ltp` or `test` had been hard coded in the Make target. We now use a target-specific variable which is only set if there is not an existing variable in the environment Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
parent
ccfbcceebd
commit
cda03f7e0d
6
Makefile
6
Makefile
@ -58,9 +58,10 @@ test-hyperkit: $(LINUXKIT) test-initrd.img test-bzImage test-cmdline
|
||||
$(call check_test_log, test.log)
|
||||
|
||||
.PHONY: test-gcp
|
||||
test-gcp: export CLOUDSDK_IMAGE_NAME?=test
|
||||
test-gcp: $(LINUXKIT) test.img.tar.gz
|
||||
$(LINUXKIT) push gcp test.img.tar.gz
|
||||
$(LINUXKIT) run gcp test | tee test-gcp.log
|
||||
$(LINUXKIT) run gcp $(CLOUDSDK_IMAGE_NAME) | tee test-gcp.log
|
||||
$(call check_test_log, test-gcp.log)
|
||||
|
||||
.PHONY: test
|
||||
@ -72,9 +73,10 @@ test-ltp.img.tar.gz: $(MOBY) test/ltp/test-ltp.yml
|
||||
$(MOBY) build --pull test/ltp/test-ltp.yml
|
||||
|
||||
.PHONY: test-ltp
|
||||
test-ltp: export CLOUDSDK_IMAGE_NAME?=test-ltp
|
||||
test-ltp: $(LINUXKIT) test-ltp.img.tar.gz
|
||||
$(LINUXKIT) push gcp test-ltp.img.tar.gz
|
||||
$(LINUXKIT) run gcp -skip-cleanup -machine n1-highcpu-4 test-ltp | tee test-ltp.log
|
||||
$(LINUXKIT) run gcp -skip-cleanup -machine n1-highcpu-4 $(CLOUDSDK_IMAGE_NAME) | tee test-ltp.log
|
||||
$(call check_test_log, test-ltp.log)
|
||||
|
||||
.PHONY: ci ci-tag ci-pr
|
||||
|
Loading…
Reference in New Issue
Block a user