blob: bb739e0c9ebe5673ea0d449abe4190859717589c [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/components.gni")
import("//tools/fidl/measure-tape/measure_tape.gni")
measure_tape("measure_tape_for_case") {
fidls = [ "//sdk/fidl/fuchsia.test" ]
target_types = [ "fuchsia.test/Case" ]
target_binding = "hlcpp"
}
source_set("test_suite_lib") {
sources = [
"test_suite.cc",
"test_suite.h",
]
public_deps = [
":measure_tape_for_case",
"//sdk/fidl/fuchsia.test",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("passing-test-example-bin") {
output_name = "passing-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "passing_test_example.cc" ]
}
executable("test-with-stderr-bin") {
output_name = "test-with-stderr"
deps = [ ":test_suite_lib" ]
sources = [ "test_with_stderr.cc" ]
}
executable("no-onfinished-after-test-example-bin") {
output_name = "no-onfinished-after-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "no_onfinished_after_test_example.cc" ]
}
executable("disabled-test-example-bin") {
output_name = "disabled-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "disabled_test_example.cc" ]
}
executable("failing-test-example-bin") {
output_name = "failing-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "failing_test_example.cc" ]
}
executable("incomplete-test-example-bin") {
output_name = "incomplete-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "incomplete_test_example.cc" ]
}
executable("invalid-test-example-bin") {
output_name = "invalid-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "invalid_test_example.cc" ]
}
executable("no-test-example-bin") {
output_name = "no-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "no_test_example.cc" ]
}
executable("huge-test-example-bin") {
output_name = "huge-test-example"
deps = [ ":test_suite_lib" ]
sources = [ "huge_test_example.cc" ]
}
executable("get-tests-hangs-example-bin") {
output_name = "get-tests-hangs-example"
deps = [ ":test_suite_lib" ]
sources = [ "get_tests_hangs_example.cc" ]
}
executable("get-tests-closes-channel-example-bin") {
output_name = "get-tests-closes-channel-example"
deps = [ ":test_suite_lib" ]
sources = [ "get_tests_closes_channel_example.cc" ]
}
executable("run-hangs-example-bin") {
output_name = "run-hangs-example"
deps = [ ":test_suite_lib" ]
sources = [ "run_hangs_example.cc" ]
}
executable("run-closes-channel-example-bin") {
output_name = "run-closes-channel-example"
deps = [ ":test_suite_lib" ]
sources = [ "run_closes_channel_example.cc" ]
}
fuchsia_component("disabled-test-example") {
deps = [ ":disabled-test-example-bin" ]
manifest = "meta/disabled-test-example.cml"
}
fuchsia_component("failing-test-example") {
deps = [ ":failing-test-example-bin" ]
manifest = "meta/failing-test-example.cml"
}
fuchsia_component("get-tests-closes-channel-example") {
deps = [ ":get-tests-closes-channel-example-bin" ]
manifest = "meta/get-tests-closes-channel-example.cml"
}
fuchsia_component("get-tests-hangs-example") {
deps = [ ":get-tests-hangs-example-bin" ]
manifest = "meta/get-tests-hangs-example.cml"
}
fuchsia_component("huge-test-example") {
deps = [ ":huge-test-example-bin" ]
manifest = "meta/huge-test-example.cml"
}
fuchsia_component("incomplete-test-example") {
deps = [ ":incomplete-test-example-bin" ]
manifest = "meta/incomplete-test-example.cml"
}
fuchsia_component("invalid-test-example") {
deps = [ ":invalid-test-example-bin" ]
manifest = "meta/invalid-test-example.cml"
}
fuchsia_component("no-onfinished-after-test-example") {
deps = [ ":no-onfinished-after-test-example-bin" ]
manifest = "meta/no-onfinished-after-test-example.cml"
}
fuchsia_component("no-test-example") {
deps = [ ":no-test-example-bin" ]
manifest = "meta/no-test-example.cml"
}
fuchsia_component("passing-test-example") {
deps = [ ":passing-test-example-bin" ]
manifest = "meta/passing-test-example.cml"
}
fuchsia_component("test-with-stderr") {
deps = [ ":test-with-stderr-bin" ]
manifest = "meta/test-with-stderr.cml"
}
fuchsia_component("run-closes-channel-example") {
deps = [ ":run-closes-channel-example-bin" ]
manifest = "meta/run-closes-channel-example.cml"
}
fuchsia_component("run-hangs-example") {
deps = [ ":run-hangs-example-bin" ]
manifest = "meta/run-hangs-example.cml"
}
fuchsia_component("echo_test_client") {
deps = [ "rust:echo_test_client" ]
manifest = "meta/echo_test_client.cml"
}
fuchsia_component("echo_test_realm") {
manifest = "meta/echo_test_realm.cml"
}
fuchsia_test_package("example-tests") {
test_components = [
":echo_test_realm",
":passing-test-example",
]
deps = [
":disabled-test-example",
":echo_test_client",
":failing-test-example",
":get-tests-closes-channel-example",
":get-tests-hangs-example",
":huge-test-example",
":incomplete-test-example",
":invalid-test-example",
":no-onfinished-after-test-example",
":no-test-example",
":run-closes-channel-example",
":run-hangs-example",
":test-with-stderr",
"//examples/components/routing/rust/echo_server:echo_server_component",
]
}
group("tests") {
testonly = true
deps = [
":example-tests",
"rust:tests",
]
}