| # Copyright 2019 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/test/test_package.gni") |
| |
| group("vsh") { |
| testonly = true |
| |
| deps = [ |
| ":client", |
| ":tests", |
| ":util", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":vsh_tests" ] |
| } |
| |
| source_set("util") { |
| sources = [ |
| "util.cc", |
| "util.h", |
| ] |
| deps = [ |
| "//src/lib/fxl", |
| "//third_party/protobuf:protobuf_lite", |
| "//zircon/public/lib/zx", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| source_set("client") { |
| sources = [ |
| "client.cc", |
| "client.h", |
| "command_runner.cc", |
| "command_runner.h", |
| ] |
| deps = [ |
| ":util", |
| "//sdk/fidl/fuchsia.virtualization", |
| "//src/lib/fxl", |
| "//src/virtualization/packages/biscotti_guest/third_party/protos:vsh_cc_proto", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| executable("vsh_unittest") { |
| visibility = [ "*:*" ] |
| testonly = true |
| |
| sources = [ |
| "command_runner_unittest.cc", |
| "util_unittest.cc", |
| ] |
| |
| deps = [ |
| ":client", |
| ":util", |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.virtualization", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/virtualization/testing", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/virtualization/packages/biscotti_guest/third_party/protos:vsh_cc_proto", |
| ] |
| } |
| |
| test_package("vsh_tests") { |
| deps = [ ":vsh_unittest" ] |
| |
| tests = [ |
| { |
| name = "vsh_unittest" |
| environments = basic_envs |
| }, |
| ] |
| } |