| 1 |
## Test that we can pass multiple files. There are several ways to do this: |
| 2 |
## list them all individually, use --libdir to shorten the list, or use a |
| 3 |
## response file (with or without --libdir). |
| 4 |
## |
| 5 |
# REQUIRES: x86-registered-target |
| 6 |
# |
| 7 |
# RUN: mkdir -p %t.dir |
| 8 |
# RUN: yaml2obj --docnum=1 %s -o %t.dir/file1 |
| 9 |
# RUN: yaml2obj --docnum=2 %s -o %t.dir/file2 |
| 10 |
# RUN: yaml2obj --docnum=3 %s -o %t.dir/file3 |
| 11 |
|
| 12 |
# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \ |
| 13 |
# RUN: %t.dir/file1 %t.dir/file2 %t.dir/file3 | \ |
| 14 |
# RUN: FileCheck %s |
| 15 |
# |
| 16 |
## Same result using --libdir. |
| 17 |
# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \ |
| 18 |
# RUN: --libdir=%t.dir file1 file2 file3 | \ |
| 19 |
# RUN: FileCheck %s |
| 20 |
# |
| 21 |
## And with a response file. |
| 22 |
# RUN: echo -e "file1\nfile2\nfile3\n" > %t.dir/resp1.txt |
| 23 |
# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \ |
| 24 |
# RUN: --libdir=%t.dir @%t.dir/resp1.txt | \ |
| 25 |
# RUN: FileCheck %s |
| 26 |
# |
| 27 |
# RUN: echo %t.dir/file1 > %t.dir/resp2.txt |
| 28 |
# RUN: echo %t.dir/file2 >> %t.dir/resp2.txt |
| 29 |
# RUN: echo %t.dir/file3 >> %t.dir/resp2.txt |
| 30 |
# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \ |
| 31 |
# RUN: @%t.dir/resp2.txt | \ |
| 32 |
# RUN: FileCheck %s |
| 33 |
# |
| 34 |
## Also check that an archive works. Put file1 and file2 into an archive, |
| 35 |
## and pass the archive name plus file3 on the command line. |
| 36 |
# RUN: rm -f %t.dir/archive.a |
| 37 |
# RUN: llvm-ar rc %t.dir/archive.a %t.dir/file1 %t.dir/file2 |
| 38 |
# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \ |
| 39 |
# RUN: --libdir=%t.dir archive.a file3 | \ |
| 40 |
# RUN: FileCheck %s |
| 41 |
# |
| 42 |
# CHECK: TLI knows {{[0-9]+}} symbols, [[#AVAILABLE:]] available |
| 43 |
# CHECK: >> TLI no SDK yes: '_ZdaPvj' |
| 44 |
# CHECK: == TLI yes SDK yes: 'abs' |
| 45 |
# CHECK: == TLI yes SDK yes: 'calloc' |
| 46 |
## The yes/no and yes/yes should add up to the total available. |
| 47 |
## The no/yes aren't included in the total available. |
| 48 |
# CHECK: << Total TLI yes SDK no: [[#AVAILABLE-2]] |
| 49 |
# CHECK: >> Total TLI no SDK yes: 1{{$}} |
| 50 |
# CHECK: == Total TLI yes SDK yes: 2{{$}} |
| 51 |
|
| 52 |
## --separate should give one summary per input file (as listed on the |
| 53 |
# command line; it doesn't break things down by archive member). |
| 54 |
# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --separate \ |
| 55 |
# RUN: --libdir=%t.dir archive.a file3 | \ |
| 56 |
# RUN: FileCheck %s --check-prefix=SEPARATE |
| 57 |
# |
| 58 |
# SEPARATE: TLI knows {{[0-9]+}} symbols, [[#AVAILABLE:]] available |
| 59 |
# SEPARATE: Found 2 global function symbols in '{{.*}}archive.a' |
| 60 |
# SEPARATE: << Total TLI yes SDK no: [[#AVAILABLE-1]] |
| 61 |
# SEPARATE: >> Total TLI no SDK yes: 1{{$}} |
| 62 |
# SEPARATE: == Total TLI yes SDK yes: 1{{$}} |
| 63 |
# SEPARATE: Found 1 global function symbols in '{{.*}}file3' |
| 64 |
# SEPARATE: << Total TLI yes SDK no: [[#AVAILABLE-1]] |
| 65 |
# SEPARATE: >> Total TLI no SDK yes: 0{{$}} |
| 66 |
# SEPARATE: == Total TLI yes SDK yes: 1{{$}} |
| 67 |
|
| 68 |
# file1 |
| 69 |
--- !ELF |
| 70 |
FileHeader: |
| 71 |
Class: ELFCLASS64 |
| 72 |
Data: ELFDATA2LSB |
| 73 |
OSABI: ELFOSABI_FREEBSD |
| 74 |
Type: ET_DYN |
| 75 |
Machine: EM_X86_64 |
| 76 |
Sections: |
| 77 |
- Name: .text |
| 78 |
Type: SHT_PROGBITS |
| 79 |
DynamicSymbols: |
| 80 |
- Name: abs |
| 81 |
Type: STT_FUNC |
| 82 |
Section: .text |
| 83 |
Binding: STB_GLOBAL |
| 84 |
|
| 85 |
# file2 |
| 86 |
--- !ELF |
| 87 |
FileHeader: |
| 88 |
Class: ELFCLASS64 |
| 89 |
Data: ELFDATA2LSB |
| 90 |
OSABI: ELFOSABI_FREEBSD |
| 91 |
Type: ET_DYN |
| 92 |
Machine: EM_X86_64 |
| 93 |
Sections: |
| 94 |
- Name: .text |
| 95 |
Type: SHT_PROGBITS |
| 96 |
DynamicSymbols: |
| 97 |
- Name: _ZdaPvj |
| 98 |
Type: STT_FUNC |
| 99 |
Section: .text |
| 100 |
Binding: STB_GLOBAL |
| 101 |
|
| 102 |
# file3 |
| 103 |
--- !ELF |
| 104 |
FileHeader: |
| 105 |
Class: ELFCLASS64 |
| 106 |
Data: ELFDATA2LSB |
| 107 |
OSABI: ELFOSABI_FREEBSD |
| 108 |
Type: ET_DYN |
| 109 |
Machine: EM_X86_64 |
| 110 |
Sections: |
| 111 |
- Name: .text |
| 112 |
Type: SHT_PROGBITS |
| 113 |
DynamicSymbols: |
| 114 |
- Name: calloc |
| 115 |
Type: STT_FUNC |
| 116 |
Section: .text |
| 117 |
Binding: STB_GLOBAL |