-
Notifications
You must be signed in to change notification settings - Fork 39
/
BUILD.bazel
116 lines (103 loc) · 2.2 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package(
default_visibility = ["//visibility:public"],
)
# Description:
#
# Effcee is a C++ library for stateful pattern matching of strings inspired by
# LLVM's FileCheck.
licenses(["notice"]) # Apache 2.0
exports_files([
"CHANGES",
"LICENSE",
])
## This is the main functionality.
cc_library(
name = "effcee",
srcs = glob(
["effcee/*.cc"],
exclude = ["effcee/*_test.cc"],
),
hdrs = glob(["effcee/*.h"]),
compatible_with = [
],
deps = [
"@re2//:re2",
],
)
## An example binary showing usage
cc_binary(
name = "effcee_example",
srcs = ["examples/main.cc"],
deps = [ ":effcee" ],
)
# Test effcee_example executable
py_test(
name = "effcee_example_test",
srcs = ["examples/effcee-example-driver.py"],
main = "examples/effcee-example-driver.py",
data = [ ":effcee_example", "examples/example_data.txt" ],
args = [
"$(location effcee_example)",
"examples/example_data.txt",
"'CHECK: Hello'",
"'CHECK-SAME: world'",
"'CHECK-NEXT: Bees'",
"'CHECK-NOT: Sting'",
"'CHECK: Honey'",
],
)
# Unit tests
cc_test(
name = "check_test",
srcs = ["effcee/check_test.cc"],
deps = [
":effcee",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)
cc_test(
name = "cursor_test",
srcs = ["effcee/cursor_test.cc"],
deps = [
":effcee",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)
cc_test(
name = "diagnostic_test",
srcs = ["effcee/diagnostic_test.cc"],
deps = [
":effcee",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)
cc_test(
name = "match_test",
srcs = ["effcee/match_test.cc"],
deps = [
":effcee",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)
cc_test(
name = "options_test",
srcs = ["effcee/options_test.cc"],
deps = [
":effcee",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)
cc_test(
name = "result_test",
srcs = ["effcee/result_test.cc"],
deps = [
":effcee",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)