blob: a436556554085e8af4200b0761a70831a19e6892 [file] [log] [blame]
Ulf Adams7a046e12015-09-07 10:57:46 +00001# Description:
2# C++ utility tests for Bazel
Ulf Adams5d737d62015-09-15 13:26:11 +00003package(default_visibility = ["//visibility:public"])
Ulf Adams7a046e12015-09-07 10:57:46 +00004
Damien Martin-Guillerez7d265e02016-07-01 13:33:48 +00005filegroup(
6 name = "srcs",
7 srcs = glob(["**"]) + ["//src/test/cpp/util:srcs"],
8 visibility = ["//src:__pkg__"],
9)
10
Ulf Adams7a046e12015-09-07 10:57:46 +000011cc_test(
12 name = "blaze_util_test",
Laszlo Csomorf2b5f272017-01-18 09:51:57 +000013 srcs = select({
tomlu1a483d42017-11-30 15:08:40 -080014 "//src/conditions:windows": [
Laszlo Csomorf2b5f272017-01-18 09:51:57 +000015 "blaze_util_windows_test.cc",
16 ],
Laszlo Csomorf2b5f272017-01-18 09:51:57 +000017 "//conditions:default": [
18 "blaze_util_test.cc",
jmmva96369c2017-07-10 18:14:36 +020019 "blaze_util_posix_test.cc",
Laszlo Csomorf2b5f272017-01-18 09:51:57 +000020 ],
21 }),
Ulf Adams7a046e12015-09-07 10:57:46 +000022 deps = [
23 "//src/main/cpp:blaze_util",
24 "//src/main/cpp/util",
25 "//third_party:gtest",
26 ],
27)
28
lpino233b72d2017-07-05 11:08:40 -040029cc_test(
30 name = "option_processor_test",
31 size = "small",
32 srcs = ["option_processor_test.cc"],
ccalvarin1cbe62a2017-08-14 21:09:07 +020033 tags = ["requires_internet"],
lpino233b72d2017-07-05 11:08:40 -040034 deps = [
35 "//src/main/cpp:blaze_util",
36 "//src/main/cpp:option_processor",
37 "//src/main/cpp:workspace_layout",
38 "//src/main/cpp/util",
39 "//third_party:gtest",
ccalvarin1cbe62a2017-08-14 21:09:07 +020040 "@com_googlesource_code_re2//:re2",
lpino233b72d2017-07-05 11:08:40 -040041 ],
42)
43
44cc_test(
45 name = "startup_options_test",
46 size = "small",
47 srcs = ["startup_options_test.cc"],
48 deps = [
49 "//src/main/cpp:blaze_util",
50 "//src/main/cpp:startup_options",
51 "//src/main/cpp:workspace_layout",
52 "//third_party:gtest",
53 ],
54)
55
56cc_test(
57 name = "workspace_layout_test",
58 size = "small",
59 srcs = ["workspace_layout_test.cc"],
60 deps = [
61 "//src/main/cpp:blaze_util",
62 "//src/main/cpp:workspace_layout",
63 "//src/main/cpp/util",
64 "//third_party:gtest",
65 ],
66)
67
Ulf Adams5d737d62015-09-15 13:26:11 +000068test_suite(name = "all_tests")
L?szl? Csomor088f6112017-09-19 17:12:32 +020069
70test_suite(
71 name = "windows_tests",
72 tags = [
73 "-no_windows",
74 "-slow",
75 ],
76 visibility = ["//visibility:private"],
77)
78
79test_suite(
80 name = "all_windows_tests",
81 tests = [
82 ":windows_tests",
83 "//src/test/cpp/util:all_windows_tests",
84 ],
85 visibility = ["//src/test:__pkg__"],
86)