blob: 82a439f21480990bb0c097206026b2060ee7a742 [file] [log] [blame]
# Copyright 2020 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.
##########################################
# Though under //zircon, this build file #
# is meant to be used in the Fuchsia GN #
# build. #
# See fxb/36139. #
##########################################
assert(!defined(zx) || zx != "/",
"This file can only be used in the Fuchsia GN build.")
import("//build/test.gni")
import("//build/unification/images/migrated_manifest.gni")
group("test") {
testonly = true
deps = [ ":lazy_init-test" ]
}
test("lazy_init-test") {
# Dependent manifests unfortunately cannot be marked as `testonly`.
# TODO(44278): Remove when converting this file to proper GN build idioms.
if (is_fuchsia) {
testonly = false
}
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
output_name = "lazy_init-test"
sources = []
deps = [
"//zircon/public/lib/lazy_init",
"//zircon/public/lib/unittest",
]
if (is_fuchsia) {
# These tests won't run on the host because some of these tests make
# use of the ASSERT_DEATH macro to ensure that certain actions result
# in program termination, which is not currently supported in the
# host test environment.
# See: TODO(ZX-1053)
sources += [ "lazy_init_tests.cc" ]
deps += [
"//zircon/public/lib/fdio",
"//zircon/public/lib/zx",
]
}
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
# TODO(47442): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
migrated_manifest("lazy_init-test-manifest") {
deps = [ ":lazy_init-test" ]
}