mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
Merge pull request #3858 from deitch/makefile-rtf-tests
move rtf commands from GHA into make test; remove unused artifacts
This commit is contained in:
commit
5200e52816
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -174,9 +174,7 @@ jobs:
|
||||
${{ runner.os }}-linuxkit-
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd test
|
||||
rtf -l build -v run -x linuxkit.packages
|
||||
run: make test TEST_SUITE=linuxkit.packages
|
||||
|
||||
test_kernel:
|
||||
name: Kernel Tests
|
||||
@ -220,9 +218,7 @@ jobs:
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd test
|
||||
rtf -l build -v run -x linuxkit.kernel
|
||||
run: make test TEST_SUITE=linuxkit.kernel
|
||||
|
||||
test_linuxkit:
|
||||
name: LinuxKit Build Tests
|
||||
@ -266,9 +262,7 @@ jobs:
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd test
|
||||
rtf -l build -v run -x linuxkit.build
|
||||
run: make test TEST_SUITE=linuxkit.build
|
||||
|
||||
test_platforms:
|
||||
name: Platform Tests
|
||||
@ -312,9 +306,7 @@ jobs:
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd test
|
||||
rtf -l build -v run -x linuxkit.platforms
|
||||
run: make test TEST_SUITE=linuxkit.platforms
|
||||
|
||||
test_security:
|
||||
name: Security Tests
|
||||
@ -358,6 +350,4 @@ jobs:
|
||||
/usr/local/bin/linuxkit version
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd test
|
||||
rtf -l build -v run -x linuxkit.security
|
||||
run: make test TEST_SUITE=linuxkit.security
|
||||
|
8
Makefile
8
Makefile
@ -1,5 +1,8 @@
|
||||
VERSION="v0.8+"
|
||||
|
||||
# test suite to run, blank for all
|
||||
TEST_SUITE ?=
|
||||
|
||||
GO_COMPILE=linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@ -78,10 +81,7 @@ sign:
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
$(MAKE) -C test
|
||||
|
||||
.PHONY: collect-artifacts
|
||||
collect-artifacts: artifacts/test.img.tar.gz artifacts/test-ltp.img.tar.gz
|
||||
$(MAKE) -C test TEST_SUITE=$(TEST_SUITE)
|
||||
|
||||
.PHONY: ci ci-tag ci-pr
|
||||
ci: test-cross
|
||||
|
@ -7,6 +7,8 @@ all: check-deps test-pr ltp
|
||||
|
||||
LINUXKIT:=$(shell command -v linuxkit 2> /dev/null)
|
||||
RTF:=$(shell command -v rtf 2> /dev/null)
|
||||
# test suite to run, blank for all
|
||||
TEST_SUITE ?=
|
||||
|
||||
.PHONY: check-deps
|
||||
check-deps:
|
||||
@ -18,17 +20,6 @@ ifndef RTF
|
||||
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
|
||||
@cat $1 |grep -q 'test suite PASSED'
|
||||
endef
|
||||
@ -42,8 +33,7 @@ ltp: $(LINUXKIT) test-ltp.img.tar.gz
|
||||
$(call check_test_log, test-ltp.log)
|
||||
### ------
|
||||
|
||||
test: gcp-hack
|
||||
@rtf -l build -v run -x
|
||||
test:
|
||||
@rtf -l build -v run -x $(TEST_SUITE)
|
||||
|
||||
test-pr: gcp-hack
|
||||
@rtf -l build -v run -x
|
||||
test-pr: test
|
||||
|
Loading…
Reference in New Issue
Block a user