From a8851f2d053a44091506487cf3b236c3c5a4c453 Mon Sep 17 00:00:00 2001 From: Ben Mehne Date: Thu, 12 Mar 2020 17:45:04 -0700 Subject: [PATCH] Fix coverage for internal_repo_rocksdb Summary: tcc gtest runner need to know the location of the binary in order to collect coverage. We can give them the location in an environment variable. Note that all these tests will break in tpx currently, though this is a bug in rocksdb's wrapper script, not tpx. Reviewed By: siying Differential Revision: D20430043 fbshipit-source-id: c77d5f70bbc28f6011c6f91906bce2ceecc2f167 --- defs.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/defs.bzl b/defs.bzl index 83e9a579f..40aba062a 100644 --- a/defs.bzl +++ b/defs.bzl @@ -35,8 +35,11 @@ def test_binary( external_deps = rocksdb_external_deps, ) + binary_path = "$(location :{})".format(test_bin) + custom_unittest( name = test_name, - command = [TEST_RUNNER, "$(location :{})".format(test_bin)], + command = [TEST_RUNNER, binary_path], type = ttype, + env = {"BUCK_BASE_BINARY": binary_path}, )