-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBUILD.bazel
96 lines (85 loc) · 2.57 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
load("@bazel_binaries//:defs.bzl", "bazel_binaries")
load("@cgrindel_bazel_starlib//bzlformat:defs.bzl", "bzlformat_pkg")
load(
"@rules_bazel_integration_test//bazel_integration_test:defs.bzl",
"bazel_integration_tests",
"default_test_runner",
"integration_test_utils",
)
load("//ci:defs.bzl", "ci_integration_test_params")
bzlformat_pkg(name = "bzlformat")
# Do not have Gazelle process the child workspace
# gazelle:exclude simple/**
filegroup(
name = "doc_files",
srcs = glob(["*.md"]) + [
# The child workspaces do not appear as packages in the parent workspace.
# Hence, we reference the relevant doc files as files, not a target.
"simple/README.md",
],
visibility = ["//:markdown_test_visibility"],
)
# MARK: - Integration Tests
default_test_runner(
name = "simple_test_runner",
bazel_cmds = [
"info",
"build //...",
"run //:update_all",
],
)
bazel_integration_tests(
name = "simple_test",
bazel_binaries = bazel_binaries,
bazel_versions = bazel_binaries.versions.all,
tags = integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS + [
# Avoid file permssion error when using disk and repository cache after
# 7.0.0rc2 upgrade.
# https://github.com/bazelbuild/bazel/issues/19908
"no-sandbox",
],
test_runner = ":simple_test_runner",
workspace_files = integration_test_utils.glob_workspace_files("simple") + [
"//:workspace_integration_test_files",
],
workspace_path = "simple",
)
# MARK: - Test Suites
test_suite(
name = "smoke_integration_tests",
tags = integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS,
tests = [
integration_test_utils.bazel_integration_test_name(
"simple_test",
bazel_binaries.versions.current,
),
],
visibility = ["//:__subpackages__"],
)
test_suite(
name = "all_integration_tests",
tags = integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS,
tests = integration_test_utils.bazel_integration_test_names(
"simple_test",
bazel_binaries.versions.all,
),
visibility = ["//:__subpackages__"],
)
ci_integration_test_params(
name = "simple_test_params",
bzlmod_modes = ["enabled"],
oss = [
"macos",
"linux",
],
test_names = integration_test_utils.bazel_integration_test_names(
"simple_test",
bazel_binaries.versions.all,
),
visibility = ["//:__subpackages__"],
)
alias(
name = "all_test_params",
actual = ":simple_test_params",
visibility = ["//:__subpackages__"],
)