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 | |
Reid Kleckner | 9e0c61b | 2018-03-05 23:18:13 +0000 | [diff] [blame^] | 6 | ; 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 Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 12 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame] | 17 | ; RUN: rm %t.bin-- |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 18 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame] | 22 | ; RUN: rm %t.bin--x86_64 |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 23 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame] | 27 | ; RUN: rm %t.bin--x86_64-unknown |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 28 | ; 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 Northover | 24c296d | 2018-03-05 15:49:00 +0000 | [diff] [blame] | 32 | ; RUN: rm %t.bin--x86_64-instcombine |
Igor Laevsky | 354fd88 | 2017-11-15 12:36:57 +0000 | [diff] [blame] | 33 | ; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine |
| 34 | ; CORRECT: Running |