Skip to content

Commit 61ed46c

Browse files
committed
[Bugpoint] Only run plugins tests if plugins are enabled
This is a followup to r360991 which applies the same logic to LLVM. Differential Revision: https://reviews.llvm.org/D62050 llvm-svn: 360993
1 parent ae1597d commit 61ed46c

14 files changed

+15
-19
lines changed

llvm/test/BugPoint/compile-custom.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --output-prefix %t %s | FileCheck %s
2-
; REQUIRES: loadable_module
2+
; REQUIRES: plugins
33

44
; Test that arguments are correctly passed in --compile-command. The output
55
; of bugpoint includes the output of the custom tool, so we just echo the args

llvm/test/BugPoint/crash-narrowfunctiontest.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; Test that bugpoint can narrow down the testcase to the important function
22
;
33
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
4-
; REQUIRES: loadable_module
4+
; REQUIRES: plugins
55

66
define i32 @foo() { ret i32 1 }
77

llvm/test/BugPoint/func-attrs-keyval.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
22
; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
3-
; REQUIRES: loadable_module
3+
; REQUIRES: plugins
44

55
; CHECK: f() #[[ATTRS:[0-9]+]]
66
define void @f() #0 {

llvm/test/BugPoint/func-attrs.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
22
; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
3-
; REQUIRES: loadable_module
3+
; REQUIRES: plugins
44

55
; CHECK: f() #[[ATTRS:[0-9]+]]
66
define void @f() #0 {

llvm/test/BugPoint/invalid-debuginfo.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
2-
; REQUIRES: loadable_module
2+
; REQUIRES: plugins
33
; CHECK: DICompileUnit not listed in llvm.dbg.cu
44

55
; When bugpoint hacks at this testcase it will at one point create illegal IR

llvm/test/BugPoint/metadata.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; REQUIRES: loadable_module
1+
; REQUIRES: plugins
22
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo -disable-strip-debug-types > /dev/null
33
; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
44
;

llvm/test/BugPoint/named-md.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
33
; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null
44
; RUN-DISABLE: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
5-
; REQUIRES: loadable_module
5+
; REQUIRES: plugins
66

77
; CHECK: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]]}
88
; CHECK-DISABLE: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]],

llvm/test/BugPoint/remove_arguments_test.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
22
; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
3-
; REQUIRES: loadable_module
3+
; REQUIRES: plugins
44

55
; Test to make sure that arguments are removed from the function if they are
66
; unnecessary. And clean up any types that frees up too.

llvm/test/BugPoint/replace-funcs-with-null.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; Test that bugpoint can reduce the set of functions by replacing them with null.
22
;
33
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
4-
; REQUIRES: loadable_module
4+
; REQUIRES: plugins
55

66
@foo2 = alias i32 (), i32 ()* @foo
77

llvm/test/BugPoint/unsymbolized.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; REQUIRES: loadable_module
1+
; REQUIRES: plugins
22
; RUN: echo "import sys" > %t.py
33
; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
44
; RUN: echo "exit(1)" >> %t.py

llvm/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ llvm_canonicalize_cmake_booleans(
1313
LLVM_TOOL_LTO_BUILD
1414
LLVM_USE_INTEL_JITEVENTS
1515
LLVM_BUILD_EXAMPLES
16+
LLVM_ENABLE_PLUGINS
1617
)
1718

1819
configure_lit_site_cfg(

llvm/test/Feature/load_module.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; PR1318
22
; RUN: opt < %s -load=%llvmshlibdir/LLVMHello%shlibext -hello \
33
; RUN: -disable-output 2>&1 | grep Hello
4-
; REQUIRES: loadable_module
4+
; REQUIRES: plugins
55
; FIXME: On Cygming, it might fail without building LLVMHello manually.
66

77
@junk = global i32 0

llvm/test/lit.cfg.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,8 @@ def get_asan_rtlib():
187187
config.available_features.add('can-execute')
188188

189189
# Loadable module
190-
# FIXME: This should be supplied by Makefile or autoconf.
191-
if sys.platform in ['win32', 'cygwin']:
192-
loadable_module = (config.enable_shared == 1)
193-
else:
194-
loadable_module = True
195-
196-
if loadable_module:
197-
config.available_features.add('loadable_module')
190+
if config.has_plugins:
191+
config.available_features.add('plugins')
198192

199193
# Static libraries are not built if BUILD_SHARED_LIBS is ON.
200194
if not config.build_shared_libs and not config.link_llvm_dylib:

llvm/test/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ config.llvm_host_triple = '@LLVM_HOST_TRIPLE@'
4545
config.host_arch = "@HOST_ARCH@"
4646
config.have_opt_viewer_modules = @LLVM_HAVE_OPT_VIEWER_MODULES@
4747
config.libcxx_used = @LLVM_LIBCXX_USED@
48+
config.has_plugins = @LLVM_ENABLE_PLUGINS@
4849

4950
# Support substitution of the tools_dir with user parameters. This is
5051
# used when we can't determine the tool dir at configuration time.

0 commit comments

Comments
 (0)