blob: dc4daa7fc1d4838cf41c4f804b049f620ee403a7 [file] [log] [blame]
Igor Laevsky354fd882017-11-15 12:36:57 +00001; If the binary looks up libraries using an rpath, we can't test this
2; without copying the whole lib dir or polluting the build dir.
3; REQUIRES: static-libs
Igor Laevsky445ae852017-11-15 13:35:42 +00004; REQUIRES: x86-registered-target
Igor Laevsky354fd882017-11-15 12:36:57 +00005
6; Temporary bitcode file
7; RUN: opt -o %t.input %s
8
9; RUN: cp llvm-opt-fuzzer %t.bin--
10; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s
11; EMPTY: -mtriple must be specified
12
13; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
14; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
15; PASSES: at least one pass should be specified
16
17; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
18; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
19; UNKNOWN: Unknown option: unknown
20
21; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine
22; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s
23; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
24; CORRECT: Running