Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: tools/android/forwarder2/BUILD.gn

Issue 2736053003: [Android] Fix port leak in the forwarder. (Closed)
Patch Set: tedchoc comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/android/BUILD.gn ('k') | tools/android/forwarder2/command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/BUILD.gn
diff --git a/tools/android/forwarder2/BUILD.gn b/tools/android/forwarder2/BUILD.gn
index c225b5053ce580f592e61f166a41064ae6d1a9cc..9a2872946c9f20be7b9c90791c6b841dc7020f4f 100644
--- a/tools/android/forwarder2/BUILD.gn
+++ b/tools/android/forwarder2/BUILD.gn
@@ -3,10 +3,13 @@
# found in the LICENSE file.
import("//build/symlink.gni")
+import("//testing/test.gni")
group("forwarder2") {
+ testonly = true
data_deps = [
":host_forwarder",
+ ":host_forwarder_unittests",
":device_forwarder_prepare_dist($default_toolchain)",
]
}
@@ -58,7 +61,7 @@ if (current_toolchain == default_toolchain) {
}
if (current_toolchain != default_toolchain) {
- executable("host_forwarder") {
+ source_set("host_forwarder_source_set") {
sources = [
"command.cc",
"command.h",
@@ -72,7 +75,8 @@ if (current_toolchain != default_toolchain) {
"forwarders_manager.h",
"host_controller.cc",
"host_controller.h",
- "host_forwarder_main.cc",
+ "host_controllers_manager.cc",
+ "host_controllers_manager.h",
"pipe_notifier.cc",
"pipe_notifier.h",
"self_deleter_helper.h",
@@ -86,9 +90,36 @@ if (current_toolchain != default_toolchain) {
"//tools/android/common",
]
}
+
+ executable("host_forwarder") {
+ sources = [
+ "host_forwarder_main.cc",
+ ]
+ deps = [
+ ":host_forwarder_source_set",
+ "//base",
+ ]
+ }
+
+ test("host_forwarder_unittests") {
+ testonly = true
+ sources = [
+ "host_controllers_manager_unittest.cc",
+ ]
+ deps = [
+ ":host_forwarder_source_set",
+ "//base",
+ "//testing/gtest",
+ "//testing/gtest:gtest_main",
+ ]
+ }
} else {
# Create a symlink from root_build_dir -> clang_x64/host_forwarder.
binary_symlink("host_forwarder") {
binary_label = ":$target_name($host_toolchain)"
}
+ binary_symlink("host_forwarder_unittests") {
+ testonly = true
+ binary_label = ":$target_name($host_toolchain)"
+ }
}
« no previous file with comments | « tools/android/BUILD.gn ('k') | tools/android/forwarder2/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698