• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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; 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
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
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
29; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine
30; CORRECT: Running
31