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
6 ; The above also applies if the binary is built with libc++.
7 ; UNSUPPORTED: libcxx-used
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
15 ; Temporary bitcode file
16 ; RUN: opt -o %t.input %s
18 ; RUN: cp llvm-opt-fuzzer %t.bin--
19 ; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s
20 ; EMPTY: -mtriple must be specified
22 ; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
23 ; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
24 ; PASSES: at least one pass should be specified
26 ; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
27 ; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
28 ; UNKNOWN: Unknown option: unknown
30 ; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine
31 ; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s
32 ; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine