From f9281920e64f597750dd88b73e194cb982d8fd40 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Tue, 6 Feb 2024 16:24:55 -0600 Subject: [PATCH] bazel: build and test subprocess functionality (#123) Signed-off-by: Michael Carroll --- BUILD.bazel | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index cafd9c2..435829a 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -41,6 +41,7 @@ gz_export_header( public_headers_no_gen = glob([ "include/gz/utils/*.hh", "include/gz/utils/detail/*.hh", + "include/gz/utils/detail/*.h", ]) gz_include_header( @@ -110,3 +111,23 @@ cc_test( "@gtest//:gtest_main", ], ) + +cc_binary( + name = "subprocess_main", + srcs = ["test/integration/subprocess/subprocess_main.cc"], + deps = [ + GZ_ROOT + "utils/cli", + ] +) + +cc_test( + name = "subprocess_TEST", + srcs = ["test/integration/subprocess_TEST.cc"], + deps = [ + ":utils", + ":subprocess_main", + "@gtest", + "@gtest//:gtest_main", + ], + local_defines = ['SUBPROCESS_EXECUTABLE_PATH=\\"utils/subprocess_main\\"'], +)