1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/tools/llvm-objcopy/ELF/error-format.test
Fangrui Song 65b109bf33 [llvm-objcopy][test] Add a test to show that argv[0] is included in error/warning messages
test/llvm-objcopy/ELF/error-format.test is similar to test/llvm-readobj/error-format.test added in D66425.

Reviewed By: grimar, jhenderson

Differential Revision: https://reviews.llvm.org/D66476

llvm-svn: 369392
2019-08-20 15:34:07 +00:00

21 lines
687 B
Plaintext

## This test shows that we include the tool name in error/warning messages.
# RUN: not llvm-objcopy %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=objcopy
# RUN: not llvm-strip %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=strip
# ERR: llvm-[[TOOL]]{{(\.exe)?}}: error: '{{.*}}': {{[Nn]}}o such file or directory
## Currently llvm-objcopy does not issue warnings, so it is not tested.
# RUN: yaml2obj %s -o %t
# RUN: llvm-strip %t %t 2>&1 | FileCheck --check-prefix=WARN %s
# WARN: llvm-strip{{(\.exe)?}}: warning: '{{.*}}' was already specified
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Machine: EM_RISCV