blob: 569965356500732827d3f1f133e0e435056bdb45 [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
Reid Kleckner9e0c61b2018-03-05 23:18:13 +00006; This test is really flaky on Windows. On Windows, executables and DLLs cannot
7; be deleted or written while they are loaded. The OS unlocks the file some
8; time after the process terminates, so if 'rm' runs too quickly, it will fail
9; with "access denied".
10; UNSUPPORTED: system-windows
11
Igor Laevsky354fd882017-11-15 12:36:57 +000012; Temporary bitcode file
13; RUN: opt -o %t.input %s
14
15; RUN: cp llvm-opt-fuzzer %t.bin--
16; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s
17; EMPTY: -mtriple must be specified
18
19; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
20; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
21; PASSES: at least one pass should be specified
22
23; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
24; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
25; UNKNOWN: Unknown option: unknown
26
27; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine
28; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s
Igor Laevsky354fd882017-11-15 12:36:57 +000029; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
30; CORRECT: Running