blob: 7ccf666df9acabf2e1b78e44a15d887b3673b3bc [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
Tim Northover2a705312018-03-09 15:44:59 +000017; RUN: rm -f %t.bin--
Igor Laevsky354fd882017-11-15 12:36:57 +000018; EMPTY: -mtriple must be specified
19
20; RUN: cp llvm-opt-fuzzer %t.bin--x86_64
21; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s
Tim Northover2a705312018-03-09 15:44:59 +000022; RUN: rm -f %t.bin--x86_64
Igor Laevsky354fd882017-11-15 12:36:57 +000023; PASSES: at least one pass should be specified
24
25; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown
26; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s
Tim Northover2a705312018-03-09 15:44:59 +000027; RUN: rm -f %t.bin--x86_64-unknown
Igor Laevsky354fd882017-11-15 12:36:57 +000028; UNKNOWN: Unknown option: unknown
29
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
Tim Northover2a705312018-03-09 15:44:59 +000032; RUN: rm -f %t.bin--x86_64-instcombine
Igor Laevsky354fd882017-11-15 12:36:57 +000033; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
34; CORRECT: Running