Commit 06a4b4b4 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Port android_relocation_packer_unittests to GN

BUG=510485

Review URL: https://codereview.chromium.org/1415803005

Cr-Commit-Position: refs/heads/master@{#356975}
parent 0404e013
...@@ -291,6 +291,10 @@ group("both_gn_and_gyp") { ...@@ -291,6 +291,10 @@ group("both_gn_and_gyp") {
] ]
} }
if (target_cpu != "x64") {
deps += [ "//third_party/android_platform:android_relocation_packer_unittests($host_toolchain)" ]
}
if (has_chrome_android_internal) { if (has_chrome_android_internal) {
deps += [ "//clank" ] # TODO(GYP) ?? deps += [ "//clank" ] # TODO(GYP) ??
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//testing/test.gni")
import("config.gni") import("config.gni")
gypi_values = exec_script("//build/gypi_to_gn.py", gypi_values = exec_script("//build/gypi_to_gn.py",
...@@ -29,4 +30,21 @@ if (current_toolchain == host_toolchain) { ...@@ -29,4 +30,21 @@ if (current_toolchain == host_toolchain) {
] ]
sources = gypi_values.relocation_packer_main_source sources = gypi_values.relocation_packer_main_source
} }
copy("copy_android_relocation_packer_test_data") {
sources = gypi_values.relocation_packer_test_data_sources
outputs = [
"$root_out_dir/{{source_file_part}}",
]
}
# GYP: //third_party/android_platform/relocation_packer.gyp:android_relocation_packer_unittests
test("android_relocation_packer_unittests") {
deps = [
":android_lib_relocation_packer",
":copy_android_relocation_packer_test_data",
"//testing/gtest",
]
sources = gypi_values.relocation_packer_test_sources
}
} }
...@@ -23,6 +23,18 @@ ...@@ -23,6 +23,18 @@
'bionic/tools/relocation_packer/src/sleb128_unittest.cc', 'bionic/tools/relocation_packer/src/sleb128_unittest.cc',
'bionic/tools/relocation_packer/src/run_all_unittests.cc', 'bionic/tools/relocation_packer/src/run_all_unittests.cc',
], ],
'relocation_packer_test_data_sources': [
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_ia32.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_ia32_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_x64.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_x64_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_mips32.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_mips32_packed.so',
],
}, },
'targets': [ 'targets': [
{ {
...@@ -51,7 +63,7 @@ ...@@ -51,7 +63,7 @@
], ],
}, },
{ {
# TODO(GN) # GN: //third_party/android_platform:android_relocation_packer_unittests
'target_name': 'android_relocation_packer_unittests', 'target_name': 'android_relocation_packer_unittests',
'toolsets': ['host'], 'toolsets': ['host'],
'type': 'executable', 'type': 'executable',
...@@ -69,16 +81,7 @@ ...@@ -69,16 +81,7 @@
{ {
'destination': '<(PRODUCT_DIR)', 'destination': '<(PRODUCT_DIR)',
'files': [ 'files': [
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32.so', '<@(relocation_packer_test_data_sources)'
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_ia32.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_ia32_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_x64.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_x64_packed.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_mips32.so',
'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_mips32_packed.so',
], ],
}, },
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment