Files
clang-p2996/llvm/test/tools/llvm-objcopy/ELF/error-format.test
Abhina Sreeskantharajan 42a21778f6 [test] Use host platform specific error message substitution in lit tests
On z/OS, the following error message is not matched correctly in lit tests.

```
EDC5129I No such file or directory.
```

This patch uses a lit config substitution to check for platform specific error messages.

Reviewed By: muiez, jhenderson

Differential Revision: https://reviews.llvm.org/D95246
2021-01-29 07:16:30 -05:00

21 lines
700 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 -DMSG=%errc_ENOENT
# RUN: not llvm-strip %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=strip -DMSG=%errc_ENOENT
# ERR: llvm-[[TOOL]]{{(\.exe)?}}: error: '{{.*}}': [[MSG]]
## 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