summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorAyush Ranjan <ayushranjan@google.com>2020-11-05 17:09:28 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-05 17:11:32 -0800
commitf27edcc708e412b5c5bbeb0c274837af94c625cc (patch)
treeadaa7bac5f63e642ae255e83bcb01740b2d563b8 /Makefile
parent8c0701462a84ff77e602f1626aec49479c308127 (diff)
[runtime tests] Add partitions to runtime tests.
This will allow us to run massive runtime tests live java to run in parallel across multiple jobs. PiperOrigin-RevId: 340956246
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8bd8c6c6e..0f976937f 100644
--- a/Makefile
+++ b/Makefile
@@ -156,12 +156,24 @@ syscall-tests: ## Run all system call tests.
@$(call submake,test TARGETS="test/syscalls/...")
%-runtime-tests: load-runtimes_%
+ifeq ($(PARTITION),)
+ @$(eval PARTITION := 1)
+endif
+ifeq ($(TOTAL_PARTITIONS),)
+ @$(eval TOTAL_PARTITIONS := 1)
+endif
@$(call submake,install-test-runtime)
- @$(call submake,test-runtime OPTIONS="--test_timeout=10800" TARGETS="//test/runtimes:$*")
+ @$(call submake,test-runtime OPTIONS="--test_timeout=10800 --test_arg=--partition=$(PARTITION) --test_arg=--total_partitions=$(TOTAL_PARTITIONS)" TARGETS="//test/runtimes:$*")
%-runtime-tests_vfs2: load-runtimes_%
+ifeq ($(PARTITION),)
+ @$(eval PARTITION := 1)
+endif
+ifeq ($(TOTAL_PARTITIONS),)
+ @$(eval TOTAL_PARTITIONS := 1)
+endif
@$(call submake,install-test-runtime RUNTIME="vfs2" ARGS="--vfs2")
- @$(call submake,test-runtime RUNTIME="vfs2" OPTIONS="--test_timeout=10800" TARGETS="//test/runtimes:$*")
+ @$(call submake,test-runtime RUNTIME="vfs2" OPTIONS="--test_timeout=10800 --test_arg=--partition=$(PARTITION) --test_arg=--total_partitions=$(TOTAL_PARTITIONS)" TARGETS="//test/runtimes:$*")
do-tests: runsc
@$(call submake,run TARGETS="//runsc" ARGS="--rootless do true")