40 lines · plain
1; If the binary looks up libraries using an rpath, we can't test this2; without copying the whole lib dir or polluting the build dir.3; REQUIRES: static-libs4; REQUIRES: x86-registered-target5 6; The above also applies if the binary is built with libc++.7; UNSUPPORTED: libcxx-used8 9; This test is really flaky on Windows. On Windows, executables and DLLs cannot10; be deleted or written while they are loaded. The OS unlocks the file some11; time after the process terminates, so if 'rm' runs too quickly, it will fail12; with "access denied".13; UNSUPPORTED: system-windows14 15; Temporary bitcode file16; RUN: opt -o %t.input %s17 18; workaround for https://openradar.appspot.com/FB891424319; RUN: rm -f %t.bin--20; RUN: rm -f %t.bin--x86_6421; RUN: rm -f %t.bin--x86_64-unknown22; RUN: rm -f %t.bin--x86_64-instcombine23 24; RUN: cp llvm-opt-fuzzer %t.bin--25; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s26; EMPTY: -mtriple must be specified27 28; RUN: cp llvm-opt-fuzzer %t.bin--x86_6429; RUN: not %t.bin--x86_64 %t.input 2>&1 | FileCheck -check-prefix=PASSES %s30; PASSES: at least one pass should be specified31 32; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-unknown33; RUN: not %t.bin--x86_64-unknown %t.input 2>&1 | FileCheck -check-prefix=UNKNOWN %s34; UNKNOWN: Unknown option: unknown35 36; RUN: cp llvm-opt-fuzzer %t.bin--x86_64-instcombine37; RUN: %t.bin--x86_64-instcombine %t.input 2>&1 | FileCheck -check-prefix=CORRECT %s38; CORRECT: Injected args: -mtriple=x86_64 -passes=instcombine39; CORRECT: Running40