Files
clang-p2996/llvm/test/tools/llvm-size/invalid-input.test
James Henderson a8eef4e5f5 [llvm-size][test] Improve llvm-size testing
This patch significantly improves the llvm-size testing. The changes
made are:

1) Change all tests to use yaml2obj instead of assembly or pre-canned
   inputs.
2) Move the tests out of the X86 directory, since they don't need to be
   there after 1).
3) Increased test coverage.
4) Added comments to explain purpose of tests.

I haven't attempted to add test coverage for all Mach-O related code, as
I am not familiar enough with that file format to be able to.

Reviewers: grimar, MaskRay

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

llvm-svn: 368821
2019-08-14 10:17:34 +00:00

23 lines
849 B
Plaintext

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