From 748972bf830c5ebfda5ce6f76941dc474d6469c2 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Tue, 11 Apr 2017 09:13:44 -0700 Subject: [PATCH 1/2] bazel: minor fixes for consuming projects Thanks to @htuch for debugging help. --- bazel/envoy_build_system.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bazel/envoy_build_system.bzl b/bazel/envoy_build_system.bzl index ca899c240497b..9e0c35c519d3d 100644 --- a/bazel/envoy_build_system.bzl +++ b/bazel/envoy_build_system.bzl @@ -96,6 +96,7 @@ def envoy_cc_test(name, srcs = srcs, data = data, deps = deps, + repository = repository, tags = test_lib_tags, ) native.cc_test( @@ -104,7 +105,7 @@ def envoy_cc_test(name, linkopts = ["-pthread"], linkstatic = 1, deps = [ - repository + name + "_lib", + ":" + name + "_lib", repository + "//test:main" ], tags = tags + ["coverage_test"], From 6bca01dd93683e99b96697d8c4674cfa822268ed Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Tue, 11 Apr 2017 09:56:23 -0700 Subject: [PATCH 2/2] more debugging --- test/test_common/environment.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_common/environment.cc b/test/test_common/environment.cc index 9d9cf7e1eb014..63cb24eeb57fc 100644 --- a/test/test_common/environment.cc +++ b/test/test_common/environment.cc @@ -71,6 +71,11 @@ std::string TestEnvironment::temporaryFileSubstitute(const std::string& path, std::string out_json_string; { std::ifstream file(tmp_json_path); + if (file.fail()) { + std::cerr << "failed to open: " << tmp_json_path << std::endl; + RELEASE_ASSERT(false); + } + std::stringstream file_string_stream; file_string_stream << file.rdbuf(); out_json_string = file_string_stream.str();