blob: 78a303c6d7378864476faabffbd0028ad5bda0f8 [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.
import("//build/components.gni")
import("//build/test.gni")
group("test") {
testonly = true
deps = [ ":lazy_init-test" ]
}
test("lazy_init-test") {
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/system/ulib/lazy_init",
"//zircon/system/ulib/zxtest",
]
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(https://fxbug.dev/42105920)
sources += [ "lazy_init_tests.cc" ]
deps += [
"//sdk/lib/fdio",
"//zircon/system/ulib/zx",
]
}
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}
fuchsia_unittest_package("lazy-init-test-pkg") {
package_name = "lazy_init-test"
deps = [ ":lazy_init-test" ]
}
group("tests") {
testonly = true
deps = [ ":lazy-init-test-pkg" ]
}