File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
llvm/test/tools/llvm-readobj Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ # RUN: rm -rf %t
2
+ # RUN: mkdir -p %t/a/b
3
+ # RUN: cd %t
4
+ # RUN: cp %p/Inputs/trivial.obj.elf-x86-64 a/b/1.o
5
+ # The archive is deliberately in a different directory to the cwd, to show that
6
+ # the member paths printed are exactly what's in the archive and not relative
7
+ # to the cwd.
8
+ # RUN: llvm-ar rcT a/relative.a a/b/1.o
9
+
10
+ # Show that relative paths in the file header printing look sensible.
11
+ # RUN: llvm-readobj --file-headers a/relative.a | FileCheck %s --check-prefix=REL
12
+ # REL: File: b/1.o
13
+
14
+ # Show that relative paths in an error message for both archive and member look
15
+ # sensible.
16
+ # RUN: rm a/b/1.o
17
+ # RUN: not llvm-readobj --file-headers a/relative.a 2>&1 | FileCheck %s --check-prefix=ERR1
18
+ # RUN: not llvm-readelf --file-headers a/relative.a 2>&1 | FileCheck %s --check-prefix=ERR1
19
+ # ERR1: Error reading file: a/relative.a: 'b/1.o': {{[Nn]}}o such file or directory
20
+
21
+ # RUN: mkdir -p %t/c
22
+ # RUN: cp %p/Inputs/trivial.obj.elf-x86-64 a/b/1.o
23
+ # RUN: llvm-ar rcT c/absolute.a %t/a/b/1.o
24
+
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 -DDIR=%t
27
+ # ABS: File: [[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.o
31
+ # RUN: not llvm-readobj --file-headers %t/c/absolute.a 2>&1 | FileCheck %s --check-prefix=ERR2 -DDIR=%t
32
+ # RUN: not llvm-readelf --file-headers %t/c/absolute.a 2>&1 | FileCheck %s --check-prefix=ERR2 -DDIR=%t
33
+ # ERR2: Error reading file: [[DIR]]/c/absolute.a: '[[DIR]]/a/b/1.o': {{[Nn]}}o such file or directory
You can’t perform that action at this time.
0 commit comments