mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	bzl: make integration tests actually work
This commit is contained in:
		@@ -1,3 +1,5 @@
 | 
				
			|||||||
 | 
					startup --expand_configs_in_place
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Show us information about failures.
 | 
					# Show us information about failures.
 | 
				
			||||||
build --verbose_failures
 | 
					build --verbose_failures
 | 
				
			||||||
test --test_output=errors
 | 
					test --test_output=errors
 | 
				
			||||||
@@ -13,4 +15,10 @@ build --sandbox_tmpfs_path=/tmp
 | 
				
			|||||||
build --sandbox_fake_username
 | 
					build --sandbox_fake_username
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Enable go race detection.
 | 
					# Enable go race detection.
 | 
				
			||||||
test --features=race
 | 
					test:unit --features=race
 | 
				
			||||||
 | 
					test:unit --test_tag_filters=-e2e,-integration
 | 
				
			||||||
 | 
					test:unit --flaky_test_attempts=3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build:integration --build_tag_filters=integration
 | 
				
			||||||
 | 
					test:integration --jobs 4
 | 
				
			||||||
 | 
					test:integration --test_tag_filters=integration
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -544,7 +544,7 @@ else
 | 
				
			|||||||
# We don't want to build any of the release artifacts when running tests.
 | 
					# We don't want to build any of the release artifacts when running tests.
 | 
				
			||||||
# Some things in vendor don't build due to empty target lists for cross-platform rules.
 | 
					# Some things in vendor don't build due to empty target lists for cross-platform rules.
 | 
				
			||||||
bazel-test:
 | 
					bazel-test:
 | 
				
			||||||
	bazel test --build_tag_filters=-e2e,-integration --test_tag_filters=-e2e,-integration --flaky_test_attempts=3 -- \
 | 
						bazel test --config=unit -- \
 | 
				
			||||||
	  //... \
 | 
						  //... \
 | 
				
			||||||
	  //hack:verify-all \
 | 
						  //hack:verify-all \
 | 
				
			||||||
	  -//build/... \
 | 
						  -//build/... \
 | 
				
			||||||
@@ -562,7 +562,8 @@ bazel-test-integration:
 | 
				
			|||||||
	@echo "$$BAZEL_TEST_INTEGRATION_HELP_INFO"
 | 
						@echo "$$BAZEL_TEST_INTEGRATION_HELP_INFO"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
bazel-test-integration:
 | 
					bazel-test-integration:
 | 
				
			||||||
	bazel test //test/integration/...
 | 
						bazel build --config integration //test/integration/...
 | 
				
			||||||
 | 
						bazel test --config integration //test/integration/...
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifeq ($(PRINT_HELP),y)
 | 
					ifeq ($(PRINT_HELP),y)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,7 +38,7 @@ http_archive(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
load("@bazel_skylib//:lib.bzl", "versions")
 | 
					load("@bazel_skylib//:lib.bzl", "versions")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
versions.check(minimum_bazel_version = "0.8.0")
 | 
					versions.check(minimum_bazel_version = "0.10.0")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains", "go_download_sdk")
 | 
					load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains", "go_download_sdk")
 | 
				
			||||||
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_repositories", "docker_pull")
 | 
					load("@io_bazel_rules_docker//docker:docker.bzl", "docker_repositories", "docker_pull")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user