-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathitest.bzl
58 lines (49 loc) · 1.27 KB
/
itest.bzl
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
""" Rules for running services in integration tests. """
load(
"//private:itest.bzl",
_itest_service = "itest_service",
_itest_service_group = "itest_service_group",
_itest_task = "itest_task",
_service_test = "service_test",
)
def itest_service(name, tags = [], hygienic = True, **kwargs):
_itest_service(
name = name,
tags = tags + ["ibazel_notify_changes"],
**kwargs
)
if hygienic:
_hygiene_test(
name = name,
tags = tags,
)
def itest_service_group(name, tags = [], hygienic = True, **kwargs):
_itest_service_group(
name = name,
tags = tags + ["ibazel_notify_changes"],
**kwargs
)
if hygienic:
_hygiene_test(
name = name,
tags = tags,
)
def itest_task(name, tags = [], hygienic = True, **kwargs):
_itest_task(
name = name,
tags = tags + ["ibazel_notify_changes"],
**kwargs
)
if hygienic:
_hygiene_test(
name = name,
tags = tags,
)
def _hygiene_test(name, **kwargs):
service_test(
name = name + "_hygiene_test",
services = [name],
test = "@rules_itest//:exit0",
**kwargs
)
service_test = _service_test