blob: e5e7466b062b3c12cf176963f8424a769fa2ce9b [file] [log] [blame]
# Copyright 2021 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/rust/rustc_test.gni")
group("echo-realm") {
deps = [ ":echo_realm" ]
}
# Realm component used to launch FIDL examples
fuchsia_component("echo_realm") {
manifest = "meta/echo_realm.cml"
}
# Integration testing components for FIDL examples
rustc_test("bin") {
name = "fidl_examples_integration"
edition = "2021"
deps = [
"//src/lib/fuchsia",
"//src/lib/fuchsia-component-test",
"//src/sys/lib/component-events",
"//third_party/rust_crates:anyhow",
]
sources = [ "src/lib.rs" ]
}
fuchsia_component("fidl_examples_test") {
testonly = true
manifest = "meta/integration_tests.cml"
deps = [ ":bin" ]
}
group("hermetic_tests") {
testonly = true
deps = [
":echo-cpp-async-test",
":echo-cpp-client-sync-test",
":echo-cpp-client-test",
":echo-cpp-wire-client-shared-test",
":echo-cpp-wire-client-sync-test",
":echo-cpp-wire-client-test",
":echo-hlcpp-client-sync-test",
":echo-hlcpp-client-test",
":echo-hlcpp-multi-client-test",
":echo-launcher-cpp-wire-test",
":echo-launcher-hlcpp-test",
":echo-launcher-rust-test",
":echo-rust-client-sync-test",
":echo-rust-client-test",
":echo-service-cpp-wire-test",
":echo-service-hlcpp-test",
":echo-service-rust-test",
]
if (current_cpu != "riscv64") {
# The Go toolchain does not support RISC-V.
deps += [
":echo-go-client-test",
":echo-launcher-go-test",
]
}
}
if (current_cpu != "riscv64") {
# The Go toolchain does not support RISC-V.
# Go example integration test packages
fuchsia_test_package("echo-go-client-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/go/client:echo-client",
"//examples/fidl/go/server:echo-server",
]
}
fuchsia_test_package("echo-launcher-go-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/go/request_pipelining/client:echo-client",
"//examples/fidl/go/request_pipelining/server:echo-server",
]
}
}
# HLCPP example integration test packages
fuchsia_test_package("echo-hlcpp-client-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/hlcpp/client:echo-client",
"//examples/fidl/hlcpp/server:echo-server",
]
}
fuchsia_test_package("echo-hlcpp-client-sync-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/hlcpp/client_sync:echo-client",
"//examples/fidl/hlcpp/server:echo-server",
]
}
fuchsia_test_package("echo-hlcpp-multi-client-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/hlcpp/multiple_clients/client:echo-client",
"//examples/fidl/hlcpp/multiple_clients/server:echo-server",
]
}
fuchsia_test_package("echo-launcher-hlcpp-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/hlcpp/request_pipelining/client:echo-client",
"//examples/fidl/hlcpp/request_pipelining/server:echo-server",
]
}
fuchsia_test_package("echo-service-hlcpp-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/hlcpp/services/client:echo-client",
"//examples/fidl/hlcpp/services/server:echo-server",
]
}
# New C++ bindings natural types example integration test packages
fuchsia_test_package("echo-cpp-client-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/client:echo-client",
"//examples/fidl/cpp/server:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
fuchsia_test_package("echo-cpp-client-sync-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/client_sync:echo-client",
"//examples/fidl/cpp/server:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
# LLCPP example integration test packages
fuchsia_test_package("echo-cpp-wire-client-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/client/wire:echo-client",
"//examples/fidl/cpp/server/wire:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
fuchsia_test_package("echo-cpp-wire-client-sync-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/client_sync/wire:echo-client",
"//examples/fidl/cpp/server/wire:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
fuchsia_test_package("echo-cpp-wire-client-shared-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/client_thread_safety:echo-client",
"//examples/fidl/cpp/server:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
fuchsia_test_package("echo-cpp-async-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/client:echo-client",
"//examples/fidl/cpp/server_async_completer:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
fuchsia_test_package("echo-launcher-cpp-wire-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/request_pipelining/client:echo-client",
"//examples/fidl/cpp/request_pipelining/server:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
fuchsia_test_package("echo-service-cpp-wire-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/cpp/services/client:echo-client",
"//examples/fidl/cpp/services/server:echo-server",
"//examples/fidl/echo-realm:echo_realm",
]
}
# Rust example integration test packages
fuchsia_test_package("echo-rust-client-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/rust/client:echo-client",
"//examples/fidl/rust/server:echo-server",
]
}
fuchsia_test_package("echo-rust-client-sync-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/rust/client_sync:echo-client",
"//examples/fidl/rust/server:echo-server",
]
}
fuchsia_test_package("echo-launcher-rust-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/rust/request_pipelining/client:echo-client",
"//examples/fidl/rust/request_pipelining/server:echo-server",
]
}
fuchsia_test_package("echo-service-rust-test") {
test_components = [ ":fidl_examples_test" ]
deps = [
"//examples/fidl/echo-realm:echo_realm",
"//examples/fidl/rust/services/client:echo-client",
"//examples/fidl/rust/services/server:echo-server",
]
}