| 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 |
| 4 |
; REQUIRES: x86-registered-target |
| 5 |
|
| 6 |
; The above also applies if the binary is built with libc++. |
| 7 |
; UNSUPPORTED: libcxx-used |
| 8 |
|
| 9 |
; This test is really flaky on Windows. On Windows, executables and DLLs cannot |
| 10 |
; be deleted or written while they are loaded. The OS unlocks the file some |
| 11 |
; time after the process terminates, so if 'rm' runs too quickly, it will fail |
| 12 |
; with "access denied". |
| 13 |
; UNSUPPORTED: system-windows |
| 14 |
|
| 15 |
; Temporary bitcode file |
| 16 |
; RUN: opt -o %t.input %s |
| 17 |
|
| 18 |
; workaround for https://openradar.appspot.com/FB8914243 |
| 19 |
; RUN: rm -f %t.bin-- |
| 20 |
; RUN: rm -f %t.bin--x86_64 |
| 21 |
; RUN: rm -f %t.bin--x86_64-unknown |
| 22 |
; RUN: rm -f %t.bin--x86_64-instcombine |
| 23 |
|
| 24 |
; RUN: cp llvm-opt-fuzzer %t.bin-- |
| 25 |
; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s |
| 26 |
; EMPTY: -mtriple must be specified |
| 27 |
|
| 28 |
; RUN: cp llvm-opt-fuzzer %t.bin--x86_64 |
| 29 |
; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s |
| 30 |
; PASSES: at least one pass should be specified |
| 31 |
|
| 32 |
; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown |
| 33 |
; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s |
| 34 |
; UNKNOWN: Unknown option: unknown |
| 35 |
|
| 36 |
; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine |
| 37 |
; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s |
| 38 |
; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine |
| 39 |
; CORRECT: Running |