| # Copyright 2018 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/config.gni") |
| |
| source_set("lib") { |
| testonly = true |
| |
| sources = [ |
| "component.cc", |
| "component.h", |
| "log_collector.cc", |
| "log_collector.h", |
| "output_collector.cc", |
| "output_collector.h", |
| "run_test_component.cc", |
| "run_test_component.h", |
| "sys_tests.cc", |
| "sys_tests.h", |
| "test_metadata.cc", |
| "test_metadata.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.boot", |
| "//sdk/fidl/fuchsia.device", |
| "//sdk/fidl/fuchsia.hardware.pty", |
| "//sdk/fidl/fuchsia.kernel", |
| "//sdk/fidl/fuchsia.logger", |
| "//sdk/fidl/fuchsia.media", |
| "//sdk/fidl/fuchsia.net.name", |
| "//sdk/fidl/fuchsia.posix.socket", |
| "//sdk/fidl/fuchsia.scheduler", |
| "//sdk/fidl/fuchsia.sys.internal", |
| "//sdk/fidl/fuchsia.sys.test", |
| "//sdk/fidl/fuchsia.sysinfo", |
| "//sdk/fidl/fuchsia.sysmem", |
| "//sdk/fidl/fuchsia.test.manager", |
| "//sdk/fidl/fuchsia.time", |
| "//sdk/fidl/fuchsia.tracing.kernel", |
| "//sdk/fidl/fuchsia.tracing.provider", |
| "//sdk/fidl/fuchsia.ui.composition", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.scenic", |
| "//sdk/fidl/fuchsia.vulkan.loader", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/cmx", |
| "//src/lib/fxl", |
| "//src/lib/json_parser", |
| "//src/lib/pkg_url", |
| "//src/sys/component_index/fidl:index", |
| "//third_party/rapidjson", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("bin") { |
| testonly = true |
| output_name = "run-test-component" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.debugdata", |
| "//sdk/fidl/fuchsia.logger", |
| "//sdk/fidl/fuchsia.process", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:enclosing_environment", |
| "//sdk/lib/syslog/cpp", |
| "//src/diagnostics/archivist/fidl:controller", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| group("run-test-component") { |
| testonly = true |
| deps = [ |
| ":run-test-component-pkg", |
| "//src/diagnostics/archivist:archivist-for-embedding", |
| ] |
| } |
| |
| # Deprecated binary name |
| resource("bin-deprecated") { |
| testonly = true |
| data_deps = [ ":bin" ] |
| sources = [ "$root_out_dir/run-test-component" ] |
| outputs = [ "bin/run_test_component" ] |
| } |
| |
| fuchsia_shell_package("run-test-component-pkg") { |
| testonly = true |
| package_name = "run_test_component" |
| deps = [ |
| ":bin", |
| ":bin-deprecated", |
| ] |
| } |
| |
| executable("test_bin") { |
| testonly = true |
| output_name = "run_test_component_unittests" |
| |
| sources = [ |
| "log_collector_unittests.cc", |
| "output_collector_unittests.cc", |
| "run_test_component_unittest.cc", |
| "sys_tests_unittests.cc", |
| "test_metadata_unittest.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_unittest_package("run_test_component_unittests") { |
| manifest = "meta/run_test_component_unittests.cmx" |
| deps = [ ":test_bin" ] |
| } |
| |
| group("run_test_component") { |
| testonly = true |
| public_deps = [ ":run-test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":run_test_component_unittests", |
| "test", |
| ] |
| } |