blob: bf211db0ebfac8244b13dba076b7b0e20674d415 [file] [log] [blame]
# Copyright 2022 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/test.gni")
import("//build/testing/cc_test_executable.gni")
group("tests") {
testonly = true
deps = [
":process_explorer_integration_tests",
":process_explorer_unit_tests",
]
# TODO(https://fxbug.dev/315843056): Remove this exception when tests run properly.
if (is_asan) {
deps -= [ ":process_explorer_integration_tests" ]
}
}
executable("mock_process") {
output_name = "mock_process"
sources = [ "mock_process.cc" ]
deps = []
}
cc_test_executable("integration_test") {
testonly = true
output_name = "process_explorer_integration_test"
sources = [ "process_explorer_integration_test.cc" ]
deps = [
"..:lib",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_hlcpp",
"//sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp",
"//sdk/fidl/fuchsia.process.explorer:fuchsia.process.explorer_hlcpp",
"//sdk/lib/fdio",
"//sdk/lib/sys/component/cpp/testing:cpp",
"//src/lib/fsl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//zircon/system/ulib/fbl",
]
}
fuchsia_test_component("process_explorer_integration_test") {
component_name = "process_explorer_integration_test"
manifest = "meta/process_explorer_integration_test.cml"
deps = [ ":integration_test" ]
}
# Run with `fx test process_explorer_integration_tests`.
fuchsia_test_package("process_explorer_integration_tests") {
test_components = [ ":process_explorer_integration_test" ]
deps = [
":mock_process",
"..:process_explorer_component",
]
}
test("process_explorer_unittest") {
sources = [ "utils_unittest.cc" ]
deps = [
"..:lib",
"//src/lib/fxl/test:gtest_main",
]
}
# Run with `fx test process_explorer_unit_tests`.
fuchsia_unittest_package("process_explorer_unit_tests") {
deps = [ ":process_explorer_unittest" ]
}