brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 54c67ed Raw
40 lines · plain
1# RUN: rm -rf %t2# RUN: mkdir -p %t/a/b3# RUN: cd %t4# RUN: yaml2obj %s -o a/b/1.o5# The archive is deliberately in a different directory to the cwd, to show that6# the member paths printed are exactly what's in the archive and not relative7# to the cwd.8# RUN: llvm-ar rcT a/relative.a a/b/1.o9 10# Show that relative paths in the file header printing look sensible.11# RUN: llvm-readobj --file-headers a/relative.a | FileCheck %s -DARFILE="a/relative.a" --check-prefix=REL12# REL: File: [[ARFILE]](b/1.o)13 14# Show that relative paths in an error message for both archive and member look15# sensible.16# RUN: rm a/b/1.o17# RUN: not llvm-readobj --file-headers a/relative.a 2>&1 | FileCheck %s --check-prefix=ERR1 -DMSG=%errc_ENOENT18# RUN: not llvm-readelf --file-headers a/relative.a 2>&1 | FileCheck %s --check-prefix=ERR1 -DMSG=%errc_ENOENT19# ERR1: error: 'a/relative.a': 'b/1.o': [[MSG]]20 21# RUN: mkdir -p %t/c22# RUN: yaml2obj %s -o a/b/1.o23# RUN: llvm-ar rcT c/absolute.a %t/a/b/1.o24 25# Show that absolute paths in the file header printing are correct.26# RUN: llvm-readobj --file-headers c/absolute.a | FileCheck %s --check-prefix=ABS -DARFILE="c/absolute.a" -DDIR=%/t27# ABS: File: [[ARFILE]]([[DIR]]/a/b/1.o)28 29# Show that absolute paths in an error message for both archive and member are correct.30# RUN: rm a/b/1.o31# RUN: not llvm-readobj --file-headers %/t/c/absolute.a 2>&1 | FileCheck %s --check-prefix=ERR2 -DDIR=%/t -DMSG=%errc_ENOENT32# RUN: not llvm-readelf --file-headers %/t/c/absolute.a 2>&1 | FileCheck %s --check-prefix=ERR2 -DDIR=%/t -DMSG=%errc_ENOENT33# ERR2: error: '[[DIR]]/c/absolute.a': '[[DIR]]/a/b/1.o': [[MSG]]34 35--- !ELF36FileHeader:37  Class: ELFCLASS3238  Data:  ELFDATA2LSB39  Type:  ET_DYN40