blob: 8bee04be12beecf5a958f8f93bc261be2dfd500a [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 = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.hardware.tee:fuchsia.hardware.tee-rustc",
"//sdk/fidl/fuchsia.tee:fuchsia.tee-rustc",
"//sdk/fidl/fuchsia.tee.manager:fuchsia.tee.manager-rustc",
"//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",
]
}
config_data("config") {
for_pkg = "sysmgr"
sources = [ "tee_manager.config" ]
}
source_set("test_common") {
testonly = true
visibility = [ ":*" ]
sources = [ "test/common.cc" ]
public_deps = [
"//sdk/fidl/fuchsia.tee",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//zircon/system/ulib/tee-client-api",
]
}
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",
"//zircon/public/lib/fit",
]
}