forked from cgrindel/rules_swift_package_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
75 lines (65 loc) · 1.93 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
load("@bazel_binaries//:defs.bzl", "bazel_binaries")
load("@cgrindel_bazel_starlib//bzlformat:defs.bzl", "bzlformat_pkg")
load("@cgrindel_bazel_starlib//bzllib:defs.bzl", "lists")
load(
"@rules_bazel_integration_test//bazel_integration_test:defs.bzl",
"integration_test_utils",
)
load(":example_infos.bzl", "example_infos")
bzlformat_pkg(name = "bzlformat")
# Exclude this entire directory from having anything generated by Gazelle. That
# way the test cases won't be fixed by `bazel run //:gazelle` when run in this
# repository.
# gazelle:exclude **
sh_binary(
name = "test_runner",
testonly = True,
srcs = ["test_runner.sh"],
data = [
"@rules_bazel_integration_test//tools:create_scratch_dir",
],
deps = [
"@bazel_tools//tools/bash/runfiles",
"@cgrindel_bazel_starlib//shlib/lib:assertions",
],
)
# MARK: - Integration Tests
[
example_infos.bazel_integration_test(ei)
for ei in example_infos.all
]
example_infos.ci_test_params_suite(
name = "all_example_test_params",
example_infos = example_infos.all,
)
_smoke_test_names = sorted(lists.flatten([
example_infos.test_name(
ei.name,
bazel_binaries.versions.current,
)
for ei in example_infos.all
]))
_all_test_names = sorted(lists.flatten([
[
example_infos.test_name(
ei.name,
version,
)
for version in ei.versions
]
for ei in example_infos.all
]))
test_suite(
name = "smoke_integration_tests",
tags = integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS,
tests = _smoke_test_names,
visibility = ["//:__subpackages__"],
)
test_suite(
name = "all_integration_tests",
# If you don't apply the test tags to the test suite, the test suite will
# be found when `bazel test //...` is executed.
tags = integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS,
tests = _all_test_names,
visibility = ["//:__subpackages__"],
)