14
14
# limitations under the License.
15
15
16
16
load ("@aspect_bazel_lib//lib:transitions.bzl" , "platform_transition_filegroup" )
17
+ load ("@bazel_skylib//rules:build_test.bzl" , "build_test" )
17
18
load ("@rules_pkg//pkg:tar.bzl" , "pkg_tar" )
18
19
20
+ build_test (
21
+ name = "hello_world_cpp_build_test" ,
22
+ targets = [
23
+ ":hello_world_cpp" ,
24
+ ":hello_world_cpp_linux_aarch64_tar" ,
25
+ ":hello_world_cpp_linux_armv7_tar" ,
26
+ ],
27
+ )
28
+
19
29
cc_binary (
20
30
name = "hello_world_cpp" ,
21
31
srcs = ["main.cpp" ],
@@ -24,8 +34,8 @@ cc_binary(
24
34
25
35
platform_transition_filegroup (
26
36
name = "hello_world_cpp_linux_aarch64" ,
27
- target_platform = "//platforms:aarch64_linux" ,
28
37
srcs = [":hello_world_cpp" ],
38
+ target_platform = "//platforms:aarch64_linux" ,
29
39
)
30
40
31
41
pkg_tar (
@@ -37,8 +47,8 @@ pkg_tar(
37
47
38
48
platform_transition_filegroup (
39
49
name = "hello_world_cpp_linux_armv7" ,
40
- target_platform = "//platforms:armv7_linux" ,
41
50
srcs = [":hello_world_cpp" ],
51
+ target_platform = "//platforms:armv7_linux" ,
42
52
)
43
53
44
54
pkg_tar (
@@ -57,8 +67,8 @@ cc_binary(
57
67
58
68
platform_transition_filegroup (
59
69
name = "hello_world_cpp_static_linux_aarch64" ,
60
- target_platform = "//platforms:aarch64_linux" ,
61
70
srcs = [":hello_world_cpp_static" ],
71
+ target_platform = "//platforms:aarch64_linux" ,
62
72
)
63
73
64
74
pkg_tar (
@@ -70,8 +80,8 @@ pkg_tar(
70
80
71
81
platform_transition_filegroup (
72
82
name = "hello_world_cpp_static_linux_armv7" ,
73
- target_platform = "//platforms:armv7_linux" ,
74
83
srcs = [":hello_world_cpp_static" ],
84
+ target_platform = "//platforms:armv7_linux" ,
75
85
)
76
86
77
87
pkg_tar (
0 commit comments