aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarco Poletti <poletti.marco@gmail.com>2020-08-09 21:10:16 -0700
committerMarco Poletti <poletti.marco@gmail.com>2020-08-09 21:10:16 -0700
commitc6d389dab4bcdb61ed1a3d9d0500f8d6feca1ecf (patch)
tree2f65fc3e2f83d33cc18f6fe5cb960dcd46680be3 /tests
parent6f3760672a0d2c772306e737d894a2ae2d8c5f58 (diff)
downloadgoogle-fruit-c6d389dab4bcdb61ed1a3d9d0500f8d6feca1ecf.tar.gz
Fix bazel build errors introduced by 94cefefb42f3685c1d64664e6aa9cbaf834b25ee when the Fruit headers are not also installed on the system where bazel runs.
Diffstat (limited to 'tests')
-rw-r--r--tests/BUILD5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/BUILD b/tests/BUILD
index b7ff089..e89f144 100644
--- a/tests/BUILD
+++ b/tests/BUILD
@@ -69,7 +69,6 @@ genrule(
],
visibility = ["//third_party/fruit/tests:__subpackages__"],
cmd = ""
- + "FRUIT_HEADERS_LOCATION=`for f in $(locations //third_party/fruit:fruit_headers); do echo \"$$f\"; done | fgrep configuration/bazel/ | head -n 1 | sed 's|configuration/bazel/.*|./|'`;"
+ "TEST_HEADERS_LOCATION=`for f in $(locations :test_headers_filegroup); do echo \"$$f\"; done | fgrep test_macros.h | sed 's|test_macros.h|./|'`;"
+ "LIBFRUIT_LOCATION=`for f in $(locations //third_party/fruit); do echo \"$$f\"; done | fgrep libfruit.so | head -n 1 | sed 's|libfruit.so|./|'`;"
+ "LIBTEST_HEADERS_LOCATION=`for f in $(locations //third_party/fruit/tests:test_headers); do echo \"$$f\"; done | fgrep libtest_headers.so | head -n 1 | sed 's|libtest_headers.so|./|'`;"
@@ -86,8 +85,8 @@ genrule(
+ "PATH_TO_COMPILED_FRUIT_LIB='third_party/fruit/tests'\n"
+ "PATH_TO_COMPILED_TEST_HEADERS='third_party/fruit/tests/test_headers'\n"
+ "PATH_TO_COMPILED_TEST_HEADERS_LIB='third_party/fruit/tests/test_headers'\n"
- + "PATH_TO_FRUIT_STATIC_HEADERS='$${FRUIT_HEADERS_LOCATION}/include'\n"
- + "PATH_TO_FRUIT_GENERATED_HEADERS='$${FRUIT_HEADERS_LOCATION}/configuration/bazel'\n"
+ + "PATH_TO_FRUIT_STATIC_HEADERS='third_party/fruit/include'\n"
+ + "PATH_TO_FRUIT_GENERATED_HEADERS='third_party/fruit/configuration/bazel'\n"
+ "PATH_TO_FRUIT_TEST_HEADERS='$${TEST_HEADERS_LOCATION}'\n"
+ "ADDITIONAL_LINKER_FLAGS='-lstdc++ -lm'\n"
+ "RUN_TESTS_UNDER_VALGRIND='0'\n"