From 9d33e38da0acea4067b8bae98f1687daf198ac05 Mon Sep 17 00:00:00 2001 From: Oliver Lee Date: Tue, 21 Nov 2023 20:23:32 -0800 Subject: [PATCH] set replacement `boost_ut` lib as testonly and remove it from code coverage reports. Change-Id: I57311078b4a256b83e81341b456144d408d9e3c4 --- .github/workflows/check.yml | 1 + BUILD.bazel | 1 + test_ut/BUILD.bazel | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index eecdee2..ff6530a 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,6 +63,7 @@ jobs: bazel \ --bazelrc=.github/workflows/ci.bazelrc \ coverage \ + --instrumentation_filter="-/:boost_ut" \ //... - uses: codecov/codecov-action@v3 diff --git a/BUILD.bazel b/BUILD.bazel index d8dc227..0549633 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -44,6 +44,7 @@ buildifier( cc_library( name = "boost_ut", + testonly = True, hdrs = ["ut.hpp"], include_prefix = "boost", visibility = ["//:__subpackages__"], diff --git a/test_ut/BUILD.bazel b/test_ut/BUILD.bazel index 09f071a..37dbf61 100644 --- a/test_ut/BUILD.bazel +++ b/test_ut/BUILD.bazel @@ -2,6 +2,7 @@ load("@rules_cc//cc:defs.bzl", "cc_binary") cc_binary( name = "test_ut_example", + testonly = True, srcs = ["test_ut_example.cpp"], deps = ["//:boost_ut"], )