blob: 2a71b6a6f73256bd62e5febc4a44b7724dc8d195 [file] [log] [blame]
# Copyright 2016 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("//src/sys/build/components.gni")
group("tests") {
testonly = true
deps = [
":basic_integration_test_app",
":integration_test_utils",
":integration_test_utils_with_trace_with_static_engine",
":nested_environment_test",
":run_test",
":self_contained_provider",
":trace_integration_tests",
":trace_tests",
":trace_tests_bin",
":two_providers_one_engine",
":two_providers_two_engines_test_app",
]
}
source_set("component_context") {
testonly = true
sources = [
"component_context.cc",
"component_context.h",
]
deps = [
"//src/lib/fxl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
public_deps = [
"//garnet/public/lib/gtest",
"//sdk/lib/sys/cpp",
]
}
# Generic main entry point target for GTest executables.
# This augments src/lib/fxl/test by adding component context.
source_set("gtest_main") {
testonly = true
sources = [ "gtest_main.cc" ]
deps = [
"//src/lib/fxl",
"//src/lib/fxl/test:test_settings",
]
public_deps = [
":component_context",
"//third_party/googletest:gtest",
]
}
executable("trace_tests_bin") {
testonly = true
output_name = "trace_tests"
deps = [ ":gtest_main" ]
}
source_set("run_test") {
testonly = true
sources = [
"run_test.cc",
"run_test.h",
]
public_deps = [
"//sdk/lib/sys/cpp",
"//zircon/public/lib/zx",
]
deps = [
":component_context",
":integration_test_utils",
"//garnet/bin/trace:options",
"//sdk/lib/fdio",
"//src/developer/tracing/lib/test_utils",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
source_set("integration_test_utils") {
testonly = true
sources = [
"integration_test_utils.cc",
"integration_test_utils.h",
]
public_deps = [
"//garnet/bin/trace:options",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/trace-provider",
"//zircon/system/ulib/trace-reader",
]
deps = [
"//sdk/lib/fdio",
"//src/lib/fxl",
"//third_party/rapidjson",
"//zircon/public/lib/async-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-reader",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
# Same as "integration_test_utils" except uses trace-with-static-engine.
# This is done in order to ensure trace-engine-static is used.
source_set("integration_test_utils_with_trace_with_static_engine") {
testonly = true
defines = [ "USE_STATIC_ENGINE" ]
sources = [
"integration_test_utils.cc",
"integration_test_utils.h",
]
public_deps = [
"//garnet/bin/trace:options",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/trace-provider:trace-provider-with-static-engine",
"//zircon/system/ulib/trace-reader",
]
deps = [
"//sdk/lib/fdio",
"//src/lib/fxl",
"//third_party/rapidjson",
"//zircon/public/lib/async-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace:trace-with-static-engine",
"//zircon/system/ulib/trace-reader",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("trace_integration_tests") {
testonly = true
sources = [ "trace_integration_tests.cc" ]
deps = [
":gtest_main",
":integration_test_utils",
":run_test",
"//src/developer/tracing/lib/test_utils",
"//src/lib/fxl/test:test_settings",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("basic_integration_test_app") {
testonly = true
sources = [
"basic_integration_tests.cc",
"basic_integration_tests.h",
"fill_buffer_and_alert_integration_test.cc",
"fill_buffer_integration_test.cc",
"integration_test_main.cc",
"simple_integration_test.cc",
]
deps = [
":integration_test_utils",
"//src/lib/fxl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("two_providers_one_engine") {
testonly = true
sources = [ "two_providers_one_engine.cc" ]
deps = [
"//src/lib/fxl",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
]
}
shared_library("self_contained_provider") {
testonly = true
sources = [
"self_contained_provider.cc",
"self_contained_provider.h",
]
deps = [
":integration_test_utils_with_trace_with_static_engine",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace:trace-with-static-engine",
"//zircon/system/ulib/trace-provider:trace-provider-fdio-connect",
"//zircon/system/ulib/trace-provider:trace-provider-with-static-engine",
]
}
executable("two_providers_two_engines_test_app") {
testonly = true
sources = [
"integration_test_main.cc",
"self_contained_provider.h",
"two_providers_two_engines.cc",
]
deps = [
":integration_test_utils",
":self_contained_provider",
"//garnet/bin/trace:options",
"//src/lib/fxl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("nested_environment_test") {
testonly = true
sources = [
"integration_test_main.cc",
"nested_environment_test.cc",
]
deps = [
":integration_test_utils",
"//src/lib/fxl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/task-utils",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("return_1234") {
testonly = true
sources = [ "return_1234.cc" ]
}
executable("return_child_result_tests") {
testonly = true
sources = [ "return_child_result_tests.cc" ]
deps = [
":gtest_main",
":integration_test_utils",
":run_test",
"//src/developer/tracing/lib/test_utils",
"//third_party/googletest:gtest",
]
}
executable("run_awhile") {
testonly = true
sources = [ "run_awhile.cc" ]
deps = [ "//zircon/public/lib/zx" ]
}
executable("detach_tests") {
testonly = true
sources = [ "detach_tests.cc" ]
deps = [
":gtest_main",
":integration_test_utils",
":run_test",
"//third_party/googletest:gtest",
"//zircon/public/lib/zx",
]
}
executable("ktrace_integration_tests") {
testonly = true
sources = [ "ktrace_integration_tests.cc" ]
deps = [
":gtest_main",
":integration_test_utils",
":run_test",
"//src/developer/tracing/lib/test_utils",
"//third_party/googletest:gtest",
"//zircon/public/lib/zx",
"//zircon/system/ulib/trace-reader",
]
}
executable("shared_provider_app") {
testonly = true
sources = [ "shared_provider.cc" ]
deps = [
":integration_test_utils",
"//src/lib/fxl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider:trace-provider-so",
]
}
executable("shared_provider_integration_tests") {
testonly = true
sources = [ "shared_provider_integration_tests.cc" ]
deps = [
":gtest_main",
":integration_test_utils",
":run_test",
"//third_party/googletest:gtest",
"//zircon/public/lib/zx",
"//zircon/system/ulib/trace-reader",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("provider_destruction_app") {
testonly = true
sources = [ "provider_destruction.cc" ]
deps = [
":integration_test_utils",
"//src/lib/fxl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
]
}
executable("provider_destruction_tests") {
testonly = true
sources = [ "provider_destruction_tests.cc" ]
deps = [
":gtest_main",
":integration_test_utils",
":run_test",
"//third_party/googletest:gtest",
"//zircon/public/lib/zx",
"//zircon/system/ulib/trace-reader",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
fuchsia_test_component("detach_tests_component") {
component_name = "detach_tests"
manifest = "meta/detach_tests.cmx"
deps = [ ":detach_tests" ]
}
fuchsia_test_component("ktrace_integration_tests_component") {
component_name = "ktrace_integration_tests"
manifest = "meta/ktrace_integration_tests.cmx"
deps = [ ":ktrace_integration_tests" ]
}
fuchsia_test_component("provider_destruction_tests_component") {
component_name = "provider_destruction_tests"
manifest = "meta/provider_destruction_tests.cmx"
deps = [ ":provider_destruction_tests" ]
}
fuchsia_test_component("return_child_result_tests_component") {
component_name = "return_child_result_tests"
manifest = "meta/return_child_result_tests.cmx"
deps = [ ":return_child_result_tests" ]
}
fuchsia_test_component("shared_provider_integration_tests_component") {
component_name = "shared_provider_integration_tests"
manifest = "meta/shared_provider_integration_tests.cmx"
deps = [ ":shared_provider_integration_tests" ]
}
fuchsia_test_component("trace_integration_tests_component") {
component_name = "trace_integration_tests"
manifest = "meta/trace_integration_tests.cmx"
deps = [ ":trace_integration_tests" ]
}
fuchsia_test_component("trace_tests_component") {
component_name = "trace_tests"
manifest = "meta/trace_tests.cmx"
deps = [ ":trace_tests_bin" ]
}
fuchsia_component("basic_integration_test_app_component") {
testonly = true
component_name = "basic_integration_test_app"
manifest = "meta/basic_integration_test_app.cmx"
deps = [ ":basic_integration_test_app" ]
}
fuchsia_component("nested_environment_test_component") {
testonly = true
component_name = "nested_environment_test"
manifest = "meta/nested_environment_test.cmx"
deps = [ ":nested_environment_test" ]
}
fuchsia_component("provider_destruction_app_component") {
testonly = true
component_name = "provider_destruction_app"
manifest = "meta/provider_destruction_app.cmx"
deps = [ ":provider_destruction_app" ]
}
fuchsia_component("shared_provider_app_component") {
testonly = true
component_name = "shared_provider_app"
manifest = "meta/shared_provider_app.cmx"
deps = [ ":shared_provider_app" ]
}
fuchsia_component("two_providers_two_engines_test_app_component") {
testonly = true
component_name = "two_providers_two_engines_test_app"
manifest = "meta/two_providers_two_engines_test_app.cmx"
deps = [ ":two_providers_two_engines_test_app" ]
}
fuchsia_test_package("trace_tests") {
test_components = [
":detach_tests_component",
":ktrace_integration_tests_component",
":provider_destruction_tests_component",
":return_child_result_tests_component",
":shared_provider_integration_tests_component",
":trace_integration_tests_component",
":trace_tests_component",
]
deps = [
":basic_integration_test_app_component",
":nested_environment_test_component",
":provider_destruction_app_component",
":return_1234",
":run_awhile",
":shared_provider_app_component",
":two_providers_one_engine",
":two_providers_two_engines_test_app_component",
]
}