blob: 5aa272a851d9869e2eb31567d343fcef69b1dabb [file]
# Copyright 2022 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/components.gni")
import("//build/test.gni")
fuchsia_component_manifest("manifest") {
component_name = "adb-file-sync"
manifest = "meta/adb-file-sync.cml"
}
fuchsia_structured_config_cpp_elf_lib("adb-file-sync-config") {
cm_label = ":manifest"
}
fuchsia_structured_config_values("adb-file-sync-config-default-values") {
cm_label = ":manifest"
values = {
filesync_moniker = ""
}
}
executable("adb-file-sync") {
sources = [
"adb-file-sync.cc",
"main.cc",
]
deps = [
":adb-file-sync-config",
"//sdk/fidl/fuchsia.hardware.adb:fuchsia.hardware.adb_cpp",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/component/outgoing/cpp",
"//sdk/lib/fdio",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//sdk/lib/zxio",
"//src/developer/adb/third_party/adb-file-sync",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
]
}
fuchsia_component("adb-file-sync-component") {
cm_label = ":manifest"
deps = [ ":adb-file-sync" ]
}
test("adb-file-sync-test-bin") {
sources = [ "adb-file-sync-test.cc" ]
deps = [
"//sdk/fidl/fuchsia.hardware.adb:fuchsia.hardware.adb_hlcpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp_testing",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_cpp_testing",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_hlcpp",
"//sdk/lib/sys/component/cpp/testing:cpp",
"//src/developer/adb/third_party/adb-file-sync",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture:gtest",
"//third_party/googletest:gtest",
]
}
fuchsia_component("adb-file-sync-test-component") {
testonly = true
component_name = "adb_file_sync_test"
manifest = "meta/adb-file-sync-test.cml"
deps = [ ":adb-file-sync-test-bin" ]
}
fuchsia_test_package("adb-file-sync-test") {
test_components = [ ":adb-file-sync-test-component" ]
deps = [
":adb-file-sync-component",
":adb-file-sync-config-default-values",
]
}
group("tests") {
testonly = true
deps = [ ":adb-file-sync-test" ]
}