tests: Add back the hack for running tests on GCP

These tests should be run via rtf but currently are
run via linuxkit-ci. This is a hack and hopefully is now
marked more clearly as such.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer
2017-05-16 12:02:07 +01:00
parent 509be016d2
commit b03beb94ef
3 changed files with 75 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
default: check-deps test
pr: check-deps test-pr
# TODO: all should point to test-all once ltp is no longer required
# TODO: should have a separate target
all: check-deps test-pr ltp
MOBY:=$(shell command -v moby 2> /dev/null)
@@ -24,6 +24,15 @@ endif
# TODO: Remove this section once we no longer depend on this in CI
### -------
# Currently the linuxkit-ci runs GCP tests outside of rtf and expects some
# files in ../artifacts. This hacky target puts them there until
# the CI can use rtf for running GCP tests
gcp-hack: ../artifacts/test.img.tar.gz
../artifacts/test.img.tar.gz:
rm -rf ../artifacts
mkdir -p ../artifacts
$(MOBY) build --pull -name ../artifacts/test hack/test.yml
define check_test_log
@cat $1 |grep -q 'test suite PASSED'
endef
@@ -31,17 +40,14 @@ endef
.PHONY: ltp
ltp: export CLOUDSDK_IMAGE_NAME?=test-ltp
ltp: $(LINUXKIT) test-ltp.img.tar.gz
$(MOBY) build --pull cases/020_stress/000_ltp/test-ltp.yml
$(MOBY) build --pull hack/test-ltp.yml
$(LINUXKIT) push gcp test-ltp.img.tar.gz
$(LINUXKIT) run gcp -skip-cleanup -machine n1-highcpu-4 $(CLOUDSDK_IMAGE_NAME) | tee test-ltp.log
$(call check_test_log, test-ltp.log)
### ------
test:
test: gcp-hack
@rtf -l build -x run
test-pr:
test-pr: gcp-hack
@rtf -vvv -l build -x run
test-all:
@rtf -vvv -x -l build,slow run