blob: 402e4b2e8759b6941b6120f61742979540ebc5d9 [file] [log] [blame]
# 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 fxbug.dev/36139. #
##########################################
assert(!defined(zx) || zx != "/",
"This file can only be used in the Fuchsia GN build.")
import("//build/test.gni")
import("//src/sys/build/fuchsia_unittest_package.gni")
test("dlopen-indirect-deps") {
output_name = "dlopen-indirect-deps-test"
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "dlopen-indirect-deps.c" ]
deps = [
"//sdk/lib/fdio",
"//zircon/public/lib/zxtest",
]
data_deps = [ ":dlopen-indirect-deps-test-module" ]
}
shared_library("dlopen-indirect-deps-test-module") {
testonly = true
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") {
testonly = true
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") {
testonly = true
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" ]
}
fuchsia_unittest_package("dlopen-indirect-deps-test-pkg") {
package_name = "dlopen-indirect-deps-test"
executable_path = "test/dlopen-indirect-deps-test"
deps = [ ":dlopen-indirect-deps" ]
}
group("tests") {
testonly = true
deps = [ ":dlopen-indirect-deps-test-pkg" ]
}