diff options
author | 2018-02-09 13:48:58 -0800 | |
---|---|---|
committer | 2018-02-12 21:51:44 -0800 | |
commit | 0ad0e5d684b9e479798d4f3e59da354c39268a2a (patch) | |
tree | 9eb36842499d04eeaa629bacb9648a56a6339afd /test/core/util/fuzzer_corpus_test.cc | |
parent | 1d168541fd55352be71116a8c8e5c9229b65b2b4 (diff) |
Fix fuzzer tests for Bazel
Diffstat (limited to 'test/core/util/fuzzer_corpus_test.cc')
-rw-r--r-- | test/core/util/fuzzer_corpus_test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/core/util/fuzzer_corpus_test.cc b/test/core/util/fuzzer_corpus_test.cc index 7849321257..18bc0ad69e 100644 --- a/test/core/util/fuzzer_corpus_test.cc +++ b/test/core/util/fuzzer_corpus_test.cc @@ -25,6 +25,7 @@ #include <stdio.h> #include <sys/types.h> +#include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/load_file.h" #include "test/core/util/test_config.h" @@ -68,6 +69,12 @@ class ExampleGenerator if (examples_.empty()) { if (!FLAGS_file.empty()) examples_.push_back(FLAGS_file); if (!FLAGS_directory.empty()) { + char* test_srcdir = gpr_getenv("TEST_SRCDIR"); + if (test_srcdir != nullptr) { + FLAGS_directory = test_srcdir + + std::string("/com_github_grpc_grpc/") + + FLAGS_directory; + } DIR* dp; struct dirent* ep; dp = opendir(FLAGS_directory.c_str()); |