blob: 9c87abc3722d60d329d6dbd23d729ba5d01183aa [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
Tim Northover24c296d2018-03-05 15:49:00 +000011; RUN: rm %t.bin--
Igor Laevsky354fd882017-11-15 12:36:57 +000012; EMPTY: -mtriple must be specified
13
14; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
15; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
Tim Northover24c296d2018-03-05 15:49:00 +000016; RUN: rm %t.bin--x86_64
Igor Laevsky354fd882017-11-15 12:36:57 +000017; PASSES: at least one pass should be specified
18
19; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
20; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
Tim Northover24c296d2018-03-05 15:49:00 +000021; RUN: rm %t.bin--x86_64-unknown
Igor Laevsky354fd882017-11-15 12:36:57 +000022; UNKNOWN: Unknown option: unknown
23
24; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine
25; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s
Tim Northover24c296d2018-03-05 15:49:00 +000026; RUN: rm %t.bin--x86_64-instcombine
Igor Laevsky354fd882017-11-15 12:36:57 +000027; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
28; CORRECT: Running