Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 1 | ; 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 Laevsky | 445ae85 | 2017-11-15 13:35:42 +0000 | [diff] [blame] | 4 | ; REQUIRES: x86-registered-target |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 5 | |
| 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame^] | 11 | ; RUN: rm %t.bin-- |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 12 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame^] | 16 | ; RUN: rm %t.bin--x86_64 |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 17 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame^] | 21 | ; RUN: rm %t.bin--x86_64-unknown |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 22 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame^] | 26 | ; RUN: rm %t.bin--x86_64-instcombine |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 27 | ; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine |
| 28 | ; CORRECT: Running |