blob: 15fa603271595a3e332fa18c395eb2e8d0d1c621 [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.
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
import("//build/testing/host_test_data.gni")
go_library("elflib") {
sources = [
"elflib.go",
"elflib_test.go",
"pe.go",
"pe_test.go",
"sources.go",
"sources_test.go",
]
}
if (is_host) {
_testdata_path = "$target_gen_dir/testdata"
go_test("elflib_tests") {
library = ":elflib"
args = [
"--test_data_dir",
rebase_path(_testdata_path, root_build_dir),
]
non_go_deps = [ ":testdata" ]
}
host_test_data("testdata") {
sources = [
"testdata/cycle.elf",
"testdata/empty-relocatable.elf",
"testdata/libc.elf.section-only",
"testdata/libc.elf.stripped",
"testdata/libc.yaml",
"testdata/libc.yaml.section-only",
"testdata/pe-no-id.exe",
"testdata/pe-x64.efi",
"testdata/pe-x64.yaml",
]
outputs = [ "${_testdata_path}/{{source_file_part}}" ]
}
}