summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-size/invalid-input.test
blob: a27c7806ab02193d10352fe93bfff20ab257f543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Show that llvm-size reports an error when passed an input file in an
## unknown format.

## FIXME: The error messages tested here are not consistently formatted, and the
##        second one doesn't even return with a non-zero exit code.
##        See https://bugs.llvm.org/show_bug.cgi?id=42970.

# RUN: not llvm-size %s 2>&1 | FileCheck %s -DFILE=%s --check-prefix=UNRECOGNIZED
# UNRECOGNIZED: {{.*}}llvm-size{{(.*)}}: [[FILE]] The file was not recognized as a valid object file

## Show that llvm-size reports an error when passed an input file in an
## unsupported format.

# RUN: yaml2obj %s -o %t
# RUN: llvm-size %t 2>&1 | FileCheck %s -DFILE=%t --check-prefix=NOTSUPPORTED
# NOTSUPPORTED: {{.*}}llvm-size{{(.*)}}: [[FILE]]: Unrecognized file type.

--- !minidump
Streams:
  - Type:    LinuxAuxv
    Size:    7
    Content: 11223344556600
OpenPOWER on IntegriCloud