118 lines · yaml
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 a3## response file (with or without --libdir).4##5# REQUIRES: x86-registered-target6#7# RUN: mkdir -p %t.dir8# RUN: yaml2obj --docnum=1 %s -o %t.dir/file19# RUN: yaml2obj --docnum=2 %s -o %t.dir/file210# RUN: yaml2obj --docnum=3 %s -o %t.dir/file311 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 %s15#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 %s20#21## And with a response file.22# RUN: echo -e "file1\nfile2\nfile3\n" > %t.dir/resp1.txt23# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \24# RUN: --libdir=%t.dir @%t.dir/resp1.txt | \25# RUN: FileCheck %s26#27# RUN: echo %t.dir/file1 > %t.dir/resp2.txt28# RUN: echo %t.dir/file2 >> %t.dir/resp2.txt29# RUN: echo %t.dir/file3 >> %t.dir/resp2.txt30# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \31# RUN: @%t.dir/resp2.txt | \32# RUN: FileCheck %s33#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.a37# RUN: llvm-ar rc %t.dir/archive.a %t.dir/file1 %t.dir/file238# RUN: llvm-tli-checker --triple x86_64-scei-ps4 --report=full \39# RUN: --libdir=%t.dir archive.a file3 | \40# RUN: FileCheck %s41#42# CHECK: TLI knows {{[0-9]+}} symbols, [[#AVAILABLE:]] available43# 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 the53# 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=SEPARATE57#58# SEPARATE: TLI knows {{[0-9]+}} symbols, [[#AVAILABLE:]] available59# 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# file169--- !ELF70FileHeader:71 Class: ELFCLASS6472 Data: ELFDATA2LSB73 OSABI: ELFOSABI_FREEBSD74 Type: ET_DYN75 Machine: EM_X86_6476Sections:77 - Name: .text78 Type: SHT_PROGBITS79DynamicSymbols:80 - Name: abs81 Type: STT_FUNC82 Section: .text83 Binding: STB_GLOBAL84 85# file286--- !ELF87FileHeader:88 Class: ELFCLASS6489 Data: ELFDATA2LSB90 OSABI: ELFOSABI_FREEBSD91 Type: ET_DYN92 Machine: EM_X86_6493Sections:94 - Name: .text95 Type: SHT_PROGBITS96DynamicSymbols:97 - Name: _ZdaPvj98 Type: STT_FUNC99 Section: .text100 Binding: STB_GLOBAL101 102# file3103--- !ELF104FileHeader:105 Class: ELFCLASS64106 Data: ELFDATA2LSB107 OSABI: ELFOSABI_FREEBSD108 Type: ET_DYN109 Machine: EM_X86_64110Sections:111 - Name: .text112 Type: SHT_PROGBITS113DynamicSymbols:114 - Name: calloc115 Type: STT_FUNC116 Section: .text117 Binding: STB_GLOBAL118