blob: 036dd4b4d332fa25d7d59d9693ca6ee2175ffd25 [file] [log] [blame]
# Copyright 2023 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/cpp/library_headers.gni")
group("testing") {
testonly = true
public_deps = [ ":ld-testing" ]
}
library_headers("headers") {
testonly = true
headers = []
public_deps = []
if (is_fuchsia) {
headers += [
"lib/ld/testing/mock-loader-service.h",
"lib/ld/testing/test-processargs.h",
"lib/ld/testing/test-vmo.h",
]
public_deps += [
"//sdk/fidl/fuchsia.ldsvc:fuchsia.ldsvc_cpp",
"//third_party/googletest:gmock",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
]
}
}
static_library("ld-testing") {
testonly = true
public_deps = [ ":headers" ]
sources = []
deps = []
if (is_fuchsia) {
sources += [
"mock-loader-service.cc",
"test-processargs.cc",
"test-vmo.cc",
]
deps += [
# TODO(https://fxbug.dev/335737373): this is included for `LD_TEST_LIBPREFIX`.
# Instead `load-test-modules-info` should extract the exact path for each
# artifact to make it possible for the caller to more simply map a
# string -> filename.
"../test:load-test-modules-info",
"//sdk/lib/fdio",
"//sdk/lib/stdcompat",
"//src/lib/elfldltl/testing",
"//third_party/googletest:gtest",
"//zircon/system/ulib/zx",
]
}
}