1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test/tools/llvm-isel-fuzzer/execname-options.ll
Xing Xue ed2ba72592 [lit][tests]Add feature libcxx-used and use it in llvm-*-fuzzer tests
When a LLVM binary such as llvm-*-fuzzer is built with libc++, it has dependency on libc++. The path to find shared libraries specified in llvm-*-fuzzer is relative. As a result, these binaries cannot be copied to an arbitrary directory and launched from there. Changes in this patch add a LIT feature to indicate that libc++ is used to build and, based on the feature exclude test cases that test by copying llvm-*-fuzzer binaries to a directory.

Reviewers: hubert.reinterpretcast, dberris, amyk, jasonliu, EricWF

Reviewed By: hubert.reinterpretcast, amyk

Subscribers: javed.absar, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61265

llvm-svn: 360672
2019-05-14 13:54:33 +00:00

23 lines
823 B
LLVM

; If the binary looks up libraries using an rpath, we can't test this
; without copying the whole lib dir or polluting the build dir.
; REQUIRES: static-libs
; The above also applies if the binary is built with libc++.
; UNSUPPORTED: libcxx-used
; RUN: echo > %t.input
; RUN: cp llvm-isel-fuzzer %t.bin--gisel
; RUN: not %t.bin--gisel %t.input 2>&1 | FileCheck -check-prefix=GISEL %s
; GISEL: Injected args: -global-isel -O0
; GISEL: -mtriple must be specified
; RUN: cp llvm-isel-fuzzer %t.bin--gisel-O2
; RUN: not %t.bin--gisel-O2 %t.input 2>&1 | FileCheck -check-prefix=GISEL-O2 %s
; GISEL-O2: Injected args: -global-isel -O0 -O2
; GISEL-O2: -mtriple must be specified
; RUN: cp llvm-isel-fuzzer %t.bin--unexist
; RUN: not %t.bin--unexist %t.input 2>&1 | FileCheck -check-prefix=NO-OPT %s
; NO-OPT: Unknown option: