aboutsummaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2019-10-25 12:01:20 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-06 23:45:36 +0000
commit21b5adc8409a64f7902bda4f8e690a42f949395f (patch)
tree4abf9db435b3a7b483209a00102cc35d67ba0a46 /BUILD.gn
parenteeef1daf1d0e6512190d159c38e78c6f111b5e16 (diff)
downloadopenscreen-21b5adc8409a64f7902bda4f8e690a42f949395f.tar.gz
Fix chrome build, add unit testing in Chrome
This patch contains preparation for running Open Screen unit tests in Chrome, as well as successfully linking in the Chrome platform implementation for Open Screen's platform target. See the follow up patch here: https://chromium-review.googlesource.com/c/chromium/src/+/1880544 Change-Id: I32c1bd728a43c5dbe155bcaa11527ad275c6b871 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1887717 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn33
1 files changed, 27 insertions, 6 deletions
diff --git a/BUILD.gn b/BUILD.gn
index b2f59afe..6667521f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -23,9 +23,7 @@ group("gn_all") {
"third_party/abseil",
"third_party/boringssl",
"third_party/jsoncpp",
- "third_party/protobuf:protoc",
"third_party/tinycbor",
- "third_party/zlib",
"tools/cddl",
"util",
]
@@ -45,17 +43,22 @@ group("gn_all") {
if (use_chromium_quic && use_mdns_responder) {
deps += [ "osp:osp_demo" ]
}
+
+ if (!build_with_chromium) {
+ deps += [
+ "third_party/protobuf:protoc",
+ "third_party/zlib",
+ ]
+ }
}
-executable("openscreen_unittests") {
+source_set("openscreen_unittests_all") {
testonly = true
- deps = [
+ public_deps = [
"cast/common:unittests",
"cast/sender:unittests",
"discovery:unittests",
"osp:unittests",
- "osp/impl/discovery/mdns:unittests",
- "osp/impl/testing:unittests",
"osp/msgs:unittests",
"platform:unittests",
"streaming/cast:unittests",
@@ -63,4 +66,22 @@ executable("openscreen_unittests") {
"third_party/googletest:gtest_main",
"util:unittests",
]
+
+ if (use_mdns_responder) {
+ public_deps += [
+ "osp/impl/discovery/mdns:unittests",
+
+ # Currently this target only includes mDNS tests.
+ "osp/impl/testing:unittests",
+ ]
+ }
+}
+
+if (!build_with_chromium) {
+ executable("openscreen_unittests") {
+ testonly = true
+ deps = [
+ ":openscreen_unittests_all",
+ ]
+ }
}