mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 12:33:02 +02:00
x86_64: Make the test environment more customizable
- Collect all test related targets under the test- prefix. - Add target to run test suite against a `make run` instance. The intended use-case is that you are testing out a new build with `make run`, and then realize that you want to run some tests. With this change, it is now possible to run `make infix-run-check` from a separate terminal - which attaches to the running instance and runs the tests. - Provide -sh targets to spawn interactive environments, which is useful during debugging. - Allow the user to supply a custom suite or list of tests to be run by 9PM.
This commit is contained in:
committed by
Joachim Wiberg
parent
d75ecf3a1e
commit
175f7e1c58
@@ -61,7 +61,7 @@ jobs:
|
||||
- name: Test
|
||||
if: matrix.platform == 'x86_64' && matrix.variant == 'netconf'
|
||||
run: |
|
||||
make infix-check
|
||||
make test-qeneth
|
||||
- name: Prepare Artifact
|
||||
run: |
|
||||
cd output
|
||||
|
||||
@@ -41,4 +41,4 @@ jobs:
|
||||
make
|
||||
- name: Regression Test
|
||||
run: |
|
||||
make infix-check
|
||||
make test-qeneth
|
||||
|
||||
+27
-7
@@ -1,8 +1,28 @@
|
||||
test-dir = $(BR2_EXTERNAL_INFIX_PATH)/test
|
||||
test-dir := $(BR2_EXTERNAL_INFIX_PATH)/test
|
||||
INFIX_TESTS ?= $(test-dir)/case/all.yaml
|
||||
|
||||
.PHONY: infix-check
|
||||
infix-check:
|
||||
$(test-dir)/env \
|
||||
-q $(test-dir)/virt/dual \
|
||||
-f $(BINARIES_DIR)/infix-x86_64.img \
|
||||
$(BR2_EXTERNAL_INFIX_PATH)/9pm/9pm.py $(test-dir)/case/all.yaml
|
||||
test-env = $(test-dir)/env \
|
||||
-f $(BINARIES_DIR)/infix-x86_64.img \
|
||||
$(1) $(2)
|
||||
|
||||
test-env-qeneth = $(call test-env,-q $(test-dir)/virt/dual,$(1))
|
||||
test-env-run = $(call test-env,-C -t $(BINARIES_DIR)/qemu.dot,$(1))
|
||||
|
||||
.PHONY: test-%
|
||||
|
||||
test-qeneth:
|
||||
$(call test-env-qeneth,\
|
||||
$(BR2_EXTERNAL_INFIX_PATH)/9pm/9pm.py \
|
||||
$(INFIX_TESTS))
|
||||
test-qeneth-sh:
|
||||
$(call test-env-qeneth,/bin/sh)
|
||||
|
||||
test-run: | ~/.infix-test-venv
|
||||
$(call test-env-run,\
|
||||
$(BR2_EXTERNAL_INFIX_PATH)/9pm/9pm.py \
|
||||
$(INFIX_TESTS))
|
||||
test-run-sh:
|
||||
$(call test-env-run,/bin/sh)
|
||||
|
||||
~/.infix-test-venv:
|
||||
$(test-dir)/docker/init-venv.sh $(test-dir)/docker/pip-requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user