| # 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. |
| |
| ########################################## |
| # 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/test/test_package.gni") |
| |
| test("dlopen-indirect-deps") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "dlopen-indirect-deps.c" ] |
| deps = [ |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/unittest", |
| ] |
| data_deps = [ ":dlopen-indirect-deps-test-module" ] |
| } |
| |
| shared_library("dlopen-indirect-deps-test-module") { |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # TODO(44278): Remove when converting this file to proper GN build idioms. |
| testonly = false |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| visibility = [ |
| ":*", |
| "//zircon/system/utest/debugger:*", |
| ] |
| sources = [ "dlopen-indirect-deps-test-module/test-module.c" ] |
| deps = [ ":dlopen-indirect-deps-test-liba" ] |
| } |
| |
| shared_library("dlopen-indirect-deps-test-liba") { |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # TODO(44278): Remove when converting this file to proper GN build idioms. |
| testonly = false |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| visibility = [ |
| ":*", |
| "//zircon/system/utest/debugger:*", |
| ] |
| sources = [ |
| "dlopen-indirect-deps-test-module/dlopen-indirect-deps-test-liba/liba.c", |
| ] |
| deps = [ ":dlopen-indirect-deps-test-libb" ] |
| } |
| |
| shared_library("dlopen-indirect-deps-test-libb") { |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # TODO(44278): Remove when converting this file to proper GN build idioms. |
| testonly = false |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| visibility = [ |
| ":*", |
| "//zircon/system/utest/debugger:*", |
| ] |
| sources = [ "dlopen-indirect-deps-test-module/dlopen-indirect-deps-test-liba/dlopen-indirect-deps-test-libb/libb.c" ] |
| } |
| |
| unittest_package("dlopen-indirect-deps-package") { |
| package_name = "dlopen-indirect-deps" |
| deps = [ ":dlopen-indirect-deps" ] |
| |
| tests = [ |
| { |
| name = "dlopen-indirect-deps" |
| dest = "dlopen-indirect-deps-test" |
| }, |
| ] |
| } |