| # 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/zircon/migrated_targets.gni") |
| |
| zx_library("zxtest") { |
| host = true |
| sdk = "source" |
| sdk_headers = [ |
| "zxtest/base/assertion.h", |
| "zxtest/base/environment.h", |
| "zxtest/base/event-broadcaster.h", |
| "zxtest/base/log-sink.h", |
| "zxtest/base/observer.h", |
| "zxtest/base/test-case.h", |
| "zxtest/base/test-driver.h", |
| "zxtest/base/test-info.h", |
| "zxtest/base/test-internal.h", |
| "zxtest/base/test.h", |
| "zxtest/base/types.h", |
| "zxtest/base/runner.h", |
| ] |
| sdk_migrated = true |
| sources = [ |
| "assertion.cc", |
| "c-wrappers.cc", |
| "event-broadcaster.cc", |
| "file-log-sink.cc", |
| "reporter.cc", |
| "runner-options.cc", |
| "runner.cc", |
| "test-case.cc", |
| "test-info.cc", |
| "test.cc", |
| "zxtest-main.cc", |
| ] |
| public_deps = [ |
| "//sdk/lib/fit:headers", |
| "//src/zircon/lib/zircon:headers", |
| |
| # Needed for cpp17::string_view. |
| "//sdk/lib/stdcompat", |
| |
| # Needed for <fbl/string.h>, <fbl/vector.h> and <fbl/function.h> |
| "//zircon/system/ulib/fbl:headers", |
| ] |
| deps = [ |
| "//sdk/lib/fit", |
| "//zircon/system/ulib/fbl", |
| ] |
| if (is_fuchsia) { |
| sources += [ "death-statement.cc" ] |
| |
| public_deps += [ |
| # Needed for <zircon/status.h> |
| "//src/zircon/lib/zircon:headers", |
| |
| # Needed for <lib/zx/*>, death-statements.h |
| "//sdk/lib/fit:headers", |
| "//zircon/system/ulib/zx:headers", |
| ] |
| |
| deps += [ |
| "//src/zircon/lib/zircon", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| metadata = { |
| # Used by the fuchsia_test_component_manifest() template. |
| test_component_manifest_cml = [ |
| { |
| include = [ "src/sys/test_runners/elf/elf_test_runner.shard.cml" ] |
| }, |
| ] |
| } |
| } |
| |
| config("prod_config") { |
| include_dirs = [ "include" ] |
| } |
| |
| # Dependency for "production" callers who use zxtest_prod header, (see that file for more). |
| source_set("prod") { |
| public = [ "include/zxtest/cpp/zxtest_prod.h" ] |
| public_configs = [ ":prod_config" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "test:tests" ] |
| } |