blob: df11783fb02e991c3b52e49ed1a4c889cc82e1a4 [file] [log] [blame]
# 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/config.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
group("tests") {
testonly = true
deps = [
":optee_smoke_test",
":optee_test",
]
}
package("tee_manager") {
meta = [
{
path = rebase_path("meta/tee_manager.cmx")
dest = "tee_manager.cmx"
},
]
deps = [ ":bin" ]
binaries = [
{
name = "tee_manager"
dest = "tee_manager"
},
]
}
rustc_binary("bin") {
name = "tee_manager"
edition = "2018"
deps = [
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/storage/fuchsia-vfs-watcher",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-hardware-tee:fuchsia-hardware-tee-rustc",
"//zircon/system/fidl/fuchsia-tee:fuchsia-tee-rustc",
"//zircon/system/fidl/fuchsia-tee-manager:fuchsia-tee-manager-rustc",
]
}
config_data("config") {
for_pkg = "sysmgr"
sources = [ "tee_manager.config" ]
}
source_set("test_common") {
testonly = true
visibility = [ ":*" ]
sources = [ "test/common.cc" ]
public_deps = [
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//zircon/public/lib/tee-client-api",
"//zircon/system/fidl/fuchsia-tee",
]
}
test_package("optee_test") {
deps = [ ":optee_test_bin" ]
binaries = [
{
name = "optee_test"
},
]
tests = [
{
name = "optee_test"
environments = [ astro_env ]
},
]
}
executable("optee_test_bin") {
testonly = true
output_name = "optee_test"
sources = [ "test/optee_test.cc" ]
deps = [ ":test_common" ]
}
test_package("optee_smoke_test") {
deps = [ ":optee_smoke_test_bin" ]
binaries = [
{
name = "optee_smoke_test"
},
]
tests = [
{
name = "optee_smoke_test"
environments = [ astro_env ]
},
]
}
executable("optee_smoke_test_bin") {
testonly = true
output_name = "optee_smoke_test"
sources = [ "test/optee_smoke_test.cc" ]
deps = [ ":test_common" ]
}