summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyush Ranjan <ayushranjan@google.com>2021-04-16 14:18:51 -0700
committergVisor bot <gvisor-bot@google.com>2021-04-16 14:20:46 -0700
commit064a849f367a5a65a248daab4642e2b06b39d562 (patch)
tree6bbb11cf95b45b578725a01a132465a8a6ad1c96
parentc980fe573d7a3488dc27c58f84aecf9ae1814f49 (diff)
[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
-rw-r--r--.buildkite/pipeline.yaml3
-rw-r--r--Makefile14
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
@@ -55,6 +55,9 @@ steps:
# Basic unit tests.
- <<: *common
+ label: ":golang: Nogo tests"
+ command: make nogo-tests
+ - <<: *common
label: ":test_tube: Unit tests"
command: make unit-tests
- <<: *common
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.