blob: 030c75c4423e9e9aa3fc228eff4fb989f91ebb11 [file] [log] [blame]
# Copyright 2020 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/config.gni")
import("//src/sys/build/components.gni")
group("tests") {
testonly = true
public_deps = [ ":package-test" ]
}
executable("unittests") {
output_name = "weavestack_unittests"
testonly = true
sources = [
"app_test.cc",
"stack_impl_test.cc",
"stack_provider_impl_test.cc",
"stack_utils_test.cc",
]
deps = []
public_deps = [
"//sdk/lib/sys/cpp/testing:unit",
"//sdk/lib/syslog/cpp",
"//src/connectivity/weave/weavestack:lib",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gtest",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
config_data("config") {
for_pkg = "weavestack-unittests"
sources = [
"testdata/default_environment.json",
"testdata/device_info.json",
]
}
resource("data") {
testonly = true
sources = [
"//src/connectivity/weave/weavestack/data/default_environment_schema.json",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_component("weavestack-unittests") {
testonly = true
manifest = "meta/weavestack_unittests.cmx"
deps = [
":config",
":data",
":unittests",
]
}
fuchsia_test_package("package-test") {
package_name = "weavestack-unittests"
test_components = [ ":weavestack-unittests" ]
deps = [ "//src/connectivity/network/netstack:component-debug" ]
}