add sharding option

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2022-10-27 10:03:16 +03:00
parent f8947c6ae6
commit cf7d83bb13
3 changed files with 15 additions and 4 deletions

View File

@@ -9,6 +9,13 @@ 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 ?=
# test shard to run, must be in format <this>/<total>, e.g. 1/10 means "first shard out of 10"
# uses total count to figure out which one to run
TEST_SHARD ?=
TEST_SHARD_ARG =
ifneq ($(TEST_SHARD),)
override TEST_SHARD_ARG=-s $(TEST_SHARD)
endif
.PHONY: check-deps
check-deps:
@@ -34,6 +41,6 @@ ltp: $(LINUXKIT) test-ltp.img.tar.gz
### ------
test:
@rtf -l build -v run -x $(TEST_SUITE)
@rtf -l build -v=2 run -x $(TEST_SUITE) $(TEST_SHARD_ARG)
test-pr: test