From 064a849f367a5a65a248daab4642e2b06b39d562 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Fri, 16 Apr 2021 14:18:51 -0700 Subject: [PATCH] [op] Split nogo target out of unit tests. Building nogo targets takes a very long time. This change extracts it into its own BuildKite job. This change also additionally speeds up other targets that were using the bazel flag --test_tag_filters. Without --build_tag_filters, the filter is not applied while building the specified targets and so we might end up building targets that are not actually tested. PiperOrigin-RevId: 368918211 --- .buildkite/pipeline.yaml | 3 +++ Makefile | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 9163db56d..3363c7117 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -54,6 +54,9 @@ steps: command: make ARCH=aarch64 load-all-images # Basic unit tests. + - <<: *common + label: ":golang: Nogo tests" + command: make nogo-tests - <<: *common label: ":test_tube: Unit tests" command: make unit-tests diff --git a/Makefile b/Makefile index ea0674f77..2944b6da5 100644 --- a/Makefile +++ b/Makefile @@ -181,11 +181,15 @@ smoke-tests: ## Runs a simple smoke test after build runsc. .PHONY: smoke-tests fuse-tests: - @$(call test,--test_tag_filters=fuse $(PARTITIONS) test/fuse/...) + @$(call test,--build_tag_filters=fuse --test_tag_filters=fuse $(PARTITIONS) test/fuse/...) .PHONY: fuse-tests +nogo-tests: + @$(call test,--build_tag_filters=nogo --test_tag_filters=nogo //:all pkg/... tools/...) +.PHONY: nogo-tests + unit-tests: ## Local package unit tests in pkg/..., tools/.., etc. - @$(call test,//:all pkg/... tools/...) + @$(call test,--build_tag_filters=-nogo --test_tag_filters=-nogo //:all pkg/... tools/...) .PHONY: unit-tests runsc-tests: ## Run all tests in runsc/... @@ -193,7 +197,7 @@ runsc-tests: ## Run all tests in runsc/... .PHONY: runsc-tests tests: ## Runs all unit tests and syscall tests. -tests: unit-tests runsc-tests syscall-tests +tests: unit-tests nogo-tests runsc-tests syscall-tests .PHONY: tests integration-tests: ## Run all standard integration tests. @@ -206,10 +210,10 @@ network-tests: iptables-tests packetdrill-tests packetimpact-tests .PHONY: network-tests syscall-%-tests: - @$(call test,--test_tag_filters=runsc_$* $(PARTITIONS) test/syscalls/...) + @$(call test,--build_tag_filters=runsc_$* --test_tag_filters=runsc_$* $(PARTITIONS) test/syscalls/...) syscall-native-tests: - @$(call test,--test_tag_filters=native $(PARTITIONS) test/syscalls/...) + @$(call test,--build_tag_filters=native --test_tag_filters=native $(PARTITIONS) test/syscalls/...) .PHONY: syscall-native-tests syscall-tests: ## Run all system call tests.