Adjust the way GN resolves command line args into files or labels.
[chromium-blink-merge.git] / tools / relocation_packer / test_data / generate_elf_file_unittest_relocs.sh
blobf90a2f658fe558c631520bad033a0382ed25ea14
1 #!/bin/bash
3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # Generates elf_file_unittest_relocs_arm{32,64}{,_packed}.so test data files
8 # from elf_file_unittest_relocs.cc. Run once to create these test data
9 # files; the files are checked into the source tree.
11 # To use:
12 # ./generate_elf_file_unittest_relocs.sh
13 # git add elf_file_unittest_relocs_arm{32,64}{,_packed}.so
15 function main() {
16 local '-r' test_data_directory="$(pwd)"
17 cd '../../..'
19 source tools/cr/cr-bash-helpers.sh
20 local arch
21 for arch in 'arm32' 'arm64'; do
22 cr 'init' '--platform=android' '--type=Debug' '--architecture='"${arch}"
23 cr 'build' 'relocation_packer_unittests_test_data'
24 done
26 local '-r' packer='out_android/Debug/obj/tools/relocation_packer'
27 local '-r' gen="${packer}/relocation_packer_unittests_test_data.gen"
29 cp "${gen}/elf_file_unittest_relocs_arm"{32,64}{,_packed}'.so' \
30 "${test_data_directory}"
32 return 0
35 main