| # 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") |
| |
| config("unused") { |
| cflags = [ "-Wno-unneeded-internal-declaration" ] |
| } |
| |
| test("lockdep-test") { |
| output_name = "lockdep-test-test" |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| sources = [ "lock_dep_test.cc" ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/lockdep", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zxtest", |
| ] |
| defines = [ |
| "LOCK_DEP_ENABLED_FEATURE_LEVEL=2", |
| "LOCK_DEP_ENABLE_DEFAULT_LOCK_POLICY=1", |
| ] |
| configs += [ ":unused" ] |
| } |
| |
| group("test") { |
| testonly = true |
| deps = [ ":lockdep-test" ] |
| } |
| |
| fuchsia_unittest_package("lockdep-test-pkg") { |
| package_name = "lockdep-test-test" |
| deps = [ ":lockdep-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lockdep-test-pkg" ] |
| } |