blob: 97bc26a3595f71ed15ea9cff1ebdfa560cdb34ed [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/components.gni")
import("//build/config.gni")
group("tests") {
testonly = true
public_deps = [ ":package-test" ]
}
executable("unittests") {
output_name = "weavestack_unittests"
testonly = true
sources = [
"app_test.cc",
"bootstrap_impl_test.cc",
"stack_impl_test.cc",
"stack_provider_impl_test.cc",
"stack_utils_test.cc",
]
public_deps = [
"//sdk/lib/sys/cpp/testing:unit",
"//sdk/lib/syslog/cpp",
"//src/connectivity/weave/weavestack:lib.static",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
}
resource("config") {
sources = [
"testdata/default_environment.json",
"testdata/device_info.json",
]
outputs = [ "weavestack-unittests/{{source_file_part}}" ]
}
resource("data") {
testonly = true
sources = [
"//src/connectivity/weave/weavestack/data/default_environment_schema.json",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_test_component("weavestack-unittests") {
manifest = "meta/weavestack_unittests.cml"
deps = [
":config",
":data",
":unittests",
]
test_type = "system"
}
fuchsia_test_package("package-test") {
package_name = "weavestack-unittests"
test_components = [ ":weavestack-unittests" ]
deps = [
"//src/connectivity/network/netstack:component-debug",
"//src/connectivity/network/tun/network-tun:component",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}