llvm.org GIT mirror llvm / master test / tools / llvm-objcopy / ELF / error-format.test
master

Tree @master (Download .tar.gz)

error-format.test @masterraw · history · blame

## 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