Merge pull request #14395 from adelez/foundry_integration

Fix fuzzer tests for Bazel
reviewable/pr13870/r2^2
adelez 7 years ago committed by GitHub
commit 8224c45866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      templates/tools/dockerfile/test/sanity/Dockerfile.template
  2. 7
      test/core/bad_ssl/generate_tests.bzl
  3. 7
      test/core/util/fuzzer_corpus_test.cc
  4. 1
      test/core/util/grpc_fuzzer.bzl
  5. 10
      tools/dockerfile/test/bazel/Dockerfile
  6. 10
      tools/dockerfile/test/sanity/Dockerfile

@ -46,12 +46,12 @@
RUN apt-get -y update
RUN apt-get -y install bazel
# Pin Bazel to 0.4.4
# Installing Bazel via apt-get first is required before installing 0.4.4 to
# Pin Bazel to 0.9.0
# Installing Bazel via apt-get first is required before installing 0.9.0 to
# allow gRPC to build without errors. See https://github.com/grpc/grpc/issues/10553
RUN curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel-0.4.4-installer-linux-x86_64.sh
RUN chmod +x ./bazel-0.4.4-installer-linux-x86_64.sh
RUN ./bazel-0.4.4-installer-linux-x86_64.sh
RUN curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.9.0/bazel-0.9.0-installer-linux-x86_64.sh
RUN chmod +x ./bazel-0.9.0-installer-linux-x86_64.sh
RUN ./bazel-0.9.0-installer-linux-x86_64.sh
<%include file="../../clang5.include"/>
<%include file="../../run_tests_addons.include"/>

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary")
def test_options():
return struct()
@ -22,7 +23,7 @@ def test_options():
BAD_SSL_TESTS = ['cert', 'alpn']
def grpc_bad_ssl_tests():
native.cc_library(
grpc_cc_library(
name = 'bad_ssl_test_server',
srcs = ['server_common.cc'],
hdrs = ['server_common.h'],
@ -31,12 +32,12 @@ def grpc_bad_ssl_tests():
'//test/core/end2end:ssl_test_data']
)
for t in BAD_SSL_TESTS:
native.cc_binary(
grpc_cc_binary(
name = 'bad_ssl_%s_server' % t,
srcs = ['servers/%s.cc' % t],
deps = [':bad_ssl_test_server'],
)
native.cc_test(
grpc_cc_test(
name = 'bad_ssl_%s_test' % t,
srcs = ['bad_ssl_test.cc'],
data = [':bad_ssl_%s_server' % t,

@ -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());

@ -23,5 +23,6 @@ def grpc_fuzzer(name, corpus, srcs = [], deps = [], **kwargs):
external_deps = [
'gtest',
],
args = ["--directory=" + native.package_name() + "/" + corpus,],
**kwargs
)

@ -33,12 +33,12 @@ RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
RUN apt-get -y update
RUN apt-get -y install bazel
# Pin Bazel to 0.4.4
# Installing Bazel via apt-get first is required before installing 0.4.4 to
# Pin Bazel to 0.9.0
# Installing Bazel via apt-get first is required before installing 0.9.0 to
# allow gRPC to build without errors. See https://github.com/grpc/grpc/issues/10553
RUN curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel-0.4.4-installer-linux-x86_64.sh
RUN chmod +x ./bazel-0.4.4-installer-linux-x86_64.sh
RUN ./bazel-0.4.4-installer-linux-x86_64.sh
RUN curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.9.0/bazel-0.9.0-installer-linux-x86_64.sh
RUN chmod +x ./bazel-0.9.0-installer-linux-x86_64.sh
RUN ./bazel-0.9.0-installer-linux-x86_64.sh
RUN mkdir -p /var/local/jenkins

@ -98,12 +98,12 @@ RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
RUN apt-get -y update
RUN apt-get -y install bazel
# Pin Bazel to 0.4.4
# Installing Bazel via apt-get first is required before installing 0.4.4 to
# Pin Bazel to 0.9.0
# Installing Bazel via apt-get first is required before installing 0.9.0 to
# allow gRPC to build without errors. See https://github.com/grpc/grpc/issues/10553
RUN curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel-0.4.4-installer-linux-x86_64.sh
RUN chmod +x ./bazel-0.4.4-installer-linux-x86_64.sh
RUN ./bazel-0.4.4-installer-linux-x86_64.sh
RUN curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.9.0/bazel-0.9.0-installer-linux-x86_64.sh
RUN chmod +x ./bazel-0.9.0-installer-linux-x86_64.sh
RUN ./bazel-0.9.0-installer-linux-x86_64.sh
RUN apt-get update && apt-get -y install wget xz-utils
RUN wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz

Loading…
Cancel
Save