Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
20 changes: 5 additions & 15 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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