move rtf commands from GHA into make test; remove unused artifacts

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher 2022-10-24 12:50:28 +03:00
parent 25c8e68f98
commit 7c2b9b3b3a
3 changed files with 14 additions and 34 deletions

View File

@ -174,9 +174,7 @@ jobs:
${{ runner.os }}-linuxkit- ${{ runner.os }}-linuxkit-
- name: Run Tests - name: Run Tests
run: | run: make test TEST_SUITE=linuxkit.packages
cd test
rtf -l build -v run -x linuxkit.packages
test_kernel: test_kernel:
name: Kernel Tests name: Kernel Tests
@ -220,9 +218,7 @@ jobs:
/usr/local/bin/linuxkit version /usr/local/bin/linuxkit version
- name: Run Tests - name: Run Tests
run: | run: make test TEST_SUITE=linuxkit.kernel
cd test
rtf -l build -v run -x linuxkit.kernel
test_linuxkit: test_linuxkit:
name: LinuxKit Build Tests name: LinuxKit Build Tests
@ -266,9 +262,7 @@ jobs:
/usr/local/bin/linuxkit version /usr/local/bin/linuxkit version
- name: Run Tests - name: Run Tests
run: | run: make test TEST_SUITE=linuxkit.build
cd test
rtf -l build -v run -x linuxkit.build
test_platforms: test_platforms:
name: Platform Tests name: Platform Tests
@ -312,9 +306,7 @@ jobs:
/usr/local/bin/linuxkit version /usr/local/bin/linuxkit version
- name: Run Tests - name: Run Tests
run: | run: make test TEST_SUITE=linuxkit.platforms
cd test
rtf -l build -v run -x linuxkit.platforms
test_security: test_security:
name: Security Tests name: Security Tests
@ -358,6 +350,4 @@ jobs:
/usr/local/bin/linuxkit version /usr/local/bin/linuxkit version
- name: Run Tests - name: Run Tests
run: | run: make test TEST_SUITE=linuxkit.security
cd test
rtf -l build -v run -x linuxkit.security

View File

@ -1,5 +1,8 @@
VERSION="v0.8+" VERSION="v0.8+"
# test suite to run, blank for all
TEST_SUITE ?=
GO_COMPILE=linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006 GO_COMPILE=linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
@ -78,10 +81,7 @@ sign:
.PHONY: test .PHONY: test
test: test:
$(MAKE) -C test $(MAKE) -C test TEST_SUITE=$(TEST_SUITE)
.PHONY: collect-artifacts
collect-artifacts: artifacts/test.img.tar.gz artifacts/test-ltp.img.tar.gz
.PHONY: ci ci-tag ci-pr .PHONY: ci ci-tag ci-pr
ci: test-cross ci: test-cross

View File

@ -7,6 +7,8 @@ all: check-deps test-pr ltp
LINUXKIT:=$(shell command -v linuxkit 2> /dev/null) LINUXKIT:=$(shell command -v linuxkit 2> /dev/null)
RTF:=$(shell command -v rtf 2> /dev/null) RTF:=$(shell command -v rtf 2> /dev/null)
# test suite to run, blank for all
TEST_SUITE ?=
.PHONY: check-deps .PHONY: check-deps
check-deps: check-deps:
@ -18,17 +20,6 @@ ifndef RTF
endif 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
$(LINUXKIT) build -format gcp -pull -name ../artifacts/test hack/test.yml
define check_test_log define check_test_log
@cat $1 |grep -q 'test suite PASSED' @cat $1 |grep -q 'test suite PASSED'
endef endef
@ -42,8 +33,7 @@ ltp: $(LINUXKIT) test-ltp.img.tar.gz
$(call check_test_log, test-ltp.log) $(call check_test_log, test-ltp.log)
### ------ ### ------
test: gcp-hack test:
@rtf -l build -v run -x @rtf -l build -v run -x $(TEST_SUITE)
test-pr: gcp-hack test-pr: test
@rtf -l build -v run -x