Skip to content

Commit

Permalink
Merge pull request envoyproxy#18 from lizan/envoy_test
Browse files Browse the repository at this point in the history
Run basic envoy test in Travis
  • Loading branch information
lizan authored Dec 21, 2016
2 parents 1d67c4c + dbe0225 commit a9b0ef4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 9 deletions.
19 changes: 18 additions & 1 deletion src/envoy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,21 @@
#
################################################################################
#
# This file is intended to be empty for repositories.bzl
cc_test(
name = "envoy_test",
data = [
"@envoy_git//:envoy-testdata",
],
copts = [
"-include ./external/envoy_git/test/precompiled/precompiled_test.h",
],
deps = [
"@envoy_git//:envoy-test-lib",
"//external:googletest_main",
],
args = [
#TODO: Make all test pass
"--gtest_filter=RouterTest.*",
],
linkstatic=1,
)
36 changes: 28 additions & 8 deletions src/envoy/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ load("@protobuf_git//:protobuf.bzl", "cc_proto_library")
exports_files(["source/precompiled/precompiled.h"])
package(default_visibility = ["//visibility:public"])
genrule(
name = "envoy-ratelimit-proto",
srcs = [
Expand Down Expand Up @@ -557,7 +559,6 @@ cc_binary(
"source/exe/main.cc",
],
copts = [
"-I./external/envoy_git/include",
"-I./external/envoy_git/source",
"-include ./external/envoy_git/source/precompiled/precompiled.h",
],
Expand All @@ -567,26 +568,45 @@ cc_binary(
linkstatic=1,
)
cc_test(
name = "envoy-test",
cc_library(
name = "envoy-test-lib",
srcs = glob([
"test/**/*.cc",
"test/**/*.h",
]),
data = glob([
"generated/**/*",
"test/**/*",
]),
copts = [
"-I./external/envoy_git/include",
"-I./external/envoy_git/source",
"-include ./external/envoy_git/test/precompiled/precompiled_test.h",
],
includes = [
"include",
],
deps = [
":envoy-common",
":envoy-test-pb",
"//external:googletest",
],
alwayslink=1,
)
filegroup(
name = "envoy-testdata",
srcs = glob([
"generated/**/*",
"test/**/*",
]),
)
cc_test(
name = "envoy-test",
data = [
":envoy-testdata",
],
deps = [
":envoy-test-lib",
":envoy-test-pb",
"//external:googletest",
],
linkstatic=1,
)"""

Expand Down

0 comments on commit a9b0ef4

Please sign in to comment.