blob: 9a420778e3a9707b7766c4e6a0df856a88bbca06 [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
4
5; Temporary bitcode file
6; RUN: opt -o %t.input %s
7
8; RUN: cp llvm-opt-fuzzer %t.bin--
9; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s
10; EMPTY: -mtriple must be specified
11
12; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
13; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
14; PASSES: at least one pass should be specified
15
16; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
17; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
18; UNKNOWN: Unknown option: unknown
19
20; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine
21; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s
22; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
23; CORRECT: Running