1 ## Test how we output JSON file summaries.
5 # RUN: yaml2obj %s -o %t.dir/obj
7 ## Test outputting file summary for a single file.
8 # RUN: llvm-readobj --elf-output-style=JSON --pretty-print %t.dir/obj | \
9 # RUN: FileCheck %s --check-prefix=SINGLE \
10 # RUN: --match-full-lines --strict-whitespace --implicit-check-not={{.}}
14 # SINGLE-NEXT: "FileSummary": {
15 # SINGLE-NEXT: "File": "{{.*}}/obj",
16 # SINGLE-NEXT: "Format": "elf64-x86-64",
17 # SINGLE-NEXT: "Arch": "x86_64",
18 # SINGLE-NEXT: "AddressSize": "64bit",
19 # SINGLE-NEXT: "LoadName": "<Not found>"
24 ## Test outputting file summary for multiple files.
25 # RUN: llvm-readobj --elf-output-style=JSON --pretty-print %t.dir/obj %t.dir/obj | \
26 # RUN: FileCheck %s --check-prefix=MULTI \
27 # RUN: --match-full-lines --strict-whitespace --implicit-check-not={{.}}
31 # MULTI-NEXT: "FileSummary": {
32 # MULTI-NEXT: "File": "{{.*}}/obj",
33 # MULTI-NEXT: "Format": "elf64-x86-64",
34 # MULTI-NEXT: "Arch": "x86_64",
35 # MULTI-NEXT: "AddressSize": "64bit",
36 # MULTI-NEXT: "LoadName": "<Not found>"
40 # MULTI-NEXT: "FileSummary": {
41 # MULTI-NEXT: "File": "{{.*}}/obj",
42 # MULTI-NEXT: "Format": "elf64-x86-64",
43 # MULTI-NEXT: "Arch": "x86_64",
44 # MULTI-NEXT: "AddressSize": "64bit",
45 # MULTI-NEXT: "LoadName": "<Not found>"
50 ## Test outputting file summary for an archive with a single file.
51 # RUN: rm -f %t.archive-single
52 # RUN: llvm-ar rc %t.archive-single %t.dir/obj
53 # RUN: llvm-readobj --elf-output-style=JSON --pretty-print %t.archive-single | \
54 # RUN: FileCheck %s --check-prefix=ARCH-SINGLE \
55 # RUN: --match-full-lines --strict-whitespace --implicit-check-not={{.}}
59 # ARCH-SINGLE-NEXT: "FileSummary": {
60 # ARCH-SINGLE-NEXT: "File": "{{.*}}.archive-single(obj)",
61 # ARCH-SINGLE-NEXT: "Format": "elf64-x86-64",
62 # ARCH-SINGLE-NEXT: "Arch": "x86_64",
63 # ARCH-SINGLE-NEXT: "AddressSize": "64bit",
64 # ARCH-SINGLE-NEXT: "LoadName": "<Not found>"
69 ## Test outputting file summary for an archive with multiple files.
70 # RUN: rm -f %t.archive-multiple
71 # RUN: llvm-ar rc %t.archive-multiple %t.dir/obj %t.dir/obj
72 # RUN: llvm-readobj --elf-output-style=JSON --pretty-print %t.archive-multiple | \
73 # RUN: FileCheck %s --check-prefix=ARCH-MULTI \
74 # RUN: --match-full-lines --strict-whitespace --implicit-check-not={{.}}
78 # ARCH-MULTI-NEXT: "FileSummary": {
79 # ARCH-MULTI-NEXT: "File": "{{.*}}.archive-multiple(obj)",
80 # ARCH-MULTI-NEXT: "Format": "elf64-x86-64",
81 # ARCH-MULTI-NEXT: "Arch": "x86_64",
82 # ARCH-MULTI-NEXT: "AddressSize": "64bit",
83 # ARCH-MULTI-NEXT: "LoadName": "<Not found>"
87 # ARCH-MULTI-NEXT: "FileSummary": {
88 # ARCH-MULTI-NEXT: "File": "{{.*}}.archive-multiple(obj)",
89 # ARCH-MULTI-NEXT: "Format": "elf64-x86-64",
90 # ARCH-MULTI-NEXT: "Arch": "x86_64",
91 # ARCH-MULTI-NEXT: "AddressSize": "64bit",
92 # ARCH-MULTI-NEXT: "LoadName": "<Not found>"