1414#
1515# SPDX-License-Identifier: Apache-2.0
1616
17- load ("@rules_cc//cc:defs.bzl" , "cc_test" )
17+ load ("@rules_cc//cc:defs.bzl" , "cc_library" , "cc_test" )
18+
19+ cc_library (
20+ name = "test" ,
21+ testonly = True ,
22+ hdrs = ["test.hpp" ],
23+ includes = ["." ],
24+ deps = ["@googletest//:gtest" ],
25+ )
1826
1927cc_test (
2028 name = "posh_moduletests" ,
@@ -25,13 +33,6 @@ cc_test(
2533 "stubs/*.hpp" ,
2634 "*.hpp" ,
2735 ]),
28- data = glob (["input/**" ]),
29- includes = [
30- "." ,
31- "mocks" ,
32- "moduletests" ,
33- "stubs" ,
34- ],
3536 linkopts = select ({
3637 "//iceoryx_platform:linux" : ["-ldl" ],
3738 "//iceoryx_platform:mac" : [],
@@ -41,8 +42,8 @@ cc_test(
4142 "//conditions:default" : ["-ldl" ],
4243 }),
4344 tags = ["exclusive" ],
44- visibility = ["//visibility:private" ],
4545 deps = [
46+ ":test" ,
4647 "//iceoryx_hoofs:iceoryx_hoofs_testing" ,
4748 "//iceoryx_posh" ,
4849 "//iceoryx_posh:iceoryx_posh_config" ,
@@ -55,15 +56,7 @@ cc_test(
5556cc_test (
5657 name = "posh_integrationtests" ,
5758 timeout = "long" ,
58- srcs = glob ([
59- "integrationtests/*.cpp" ,
60- "integrationtests/*.hpp" ,
61- "*.hpp" ,
62- ]),
63- includes = [
64- "." ,
65- "integrationtests" ,
66- ],
59+ srcs = glob (["integrationtests/*" ]),
6760 linkopts = select ({
6861 "//iceoryx_platform:linux" : ["-ldl" ],
6962 "//iceoryx_platform:mac" : [],
@@ -73,8 +66,8 @@ cc_test(
7366 "//conditions:default" : ["-ldl" ],
7467 }),
7568 tags = ["exclusive" ],
76- visibility = ["//visibility:private" ],
7769 deps = [
70+ ":test" ,
7871 "//iceoryx_hoofs:iceoryx_hoofs_testing" ,
7972 "//iceoryx_posh" ,
8073 "//iceoryx_posh:iceoryx_posh_gateway" ,
0 commit comments