[llvm] r360993 - [Bugpoint] Only run plugins tests if plugins are enabled

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 23:41:04 PDT 2019


Author: phosek
Date: Thu May 16 23:41:04 2019
New Revision: 360993

URL: http://llvm.org/viewvc/llvm-project?rev=360993&view=rev
Log:
[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

Modified:
    llvm/trunk/test/BugPoint/compile-custom.ll
    llvm/trunk/test/BugPoint/crash-narrowfunctiontest.ll
    llvm/trunk/test/BugPoint/func-attrs-keyval.ll
    llvm/trunk/test/BugPoint/func-attrs.ll
    llvm/trunk/test/BugPoint/invalid-debuginfo.ll
    llvm/trunk/test/BugPoint/metadata.ll
    llvm/trunk/test/BugPoint/named-md.ll
    llvm/trunk/test/BugPoint/remove_arguments_test.ll
    llvm/trunk/test/BugPoint/replace-funcs-with-null.ll
    llvm/trunk/test/BugPoint/unsymbolized.ll
    llvm/trunk/test/CMakeLists.txt
    llvm/trunk/test/Feature/load_module.ll
    llvm/trunk/test/lit.cfg.py
    llvm/trunk/test/lit.site.cfg.py.in

Modified: llvm/trunk/test/BugPoint/compile-custom.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/compile-custom.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/compile-custom.ll (original)
+++ llvm/trunk/test/BugPoint/compile-custom.ll Thu May 16 23:41:04 2019
@@ -1,5 +1,5 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --output-prefix %t %s | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; Test that arguments are correctly passed in --compile-command.  The output
 ; of bugpoint includes the output of the custom tool, so we just echo the args

Modified: llvm/trunk/test/BugPoint/crash-narrowfunctiontest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/crash-narrowfunctiontest.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/crash-narrowfunctiontest.ll (original)
+++ llvm/trunk/test/BugPoint/crash-narrowfunctiontest.ll Thu May 16 23:41:04 2019
@@ -1,7 +1,7 @@
 ; Test that bugpoint can narrow down the testcase to the important function
 ;
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 define i32 @foo() { ret i32 1 }
 

Modified: llvm/trunk/test/BugPoint/func-attrs-keyval.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/func-attrs-keyval.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/func-attrs-keyval.ll (original)
+++ llvm/trunk/test/BugPoint/func-attrs-keyval.ll Thu May 16 23:41:04 2019
@@ -1,6 +1,6 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; CHECK: f() #[[ATTRS:[0-9]+]]
 define void @f() #0 {

Modified: llvm/trunk/test/BugPoint/func-attrs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/func-attrs.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/func-attrs.ll (original)
+++ llvm/trunk/test/BugPoint/func-attrs.ll Thu May 16 23:41:04 2019
@@ -1,6 +1,6 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; CHECK: f() #[[ATTRS:[0-9]+]]
 define void @f() #0 {

Modified: llvm/trunk/test/BugPoint/invalid-debuginfo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/invalid-debuginfo.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/invalid-debuginfo.ll (original)
+++ llvm/trunk/test/BugPoint/invalid-debuginfo.ll Thu May 16 23:41:04 2019
@@ -1,5 +1,5 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; CHECK: DICompileUnit not listed in llvm.dbg.cu
 
 ; When bugpoint hacks at this testcase it will at one point create illegal IR

Modified: llvm/trunk/test/BugPoint/metadata.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/metadata.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/metadata.ll (original)
+++ llvm/trunk/test/BugPoint/metadata.ll Thu May 16 23:41:04 2019
@@ -1,4 +1,4 @@
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; 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
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
 ;

Modified: llvm/trunk/test/BugPoint/named-md.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/named-md.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/named-md.ll (original)
+++ llvm/trunk/test/BugPoint/named-md.ll Thu May 16 23:41:04 2019
@@ -2,7 +2,7 @@
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
 ; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null
 ; RUN-DISABLE: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; CHECK: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]]}
 ; CHECK-DISABLE:      !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]],

Modified: llvm/trunk/test/BugPoint/remove_arguments_test.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/remove_arguments_test.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/remove_arguments_test.ll (original)
+++ llvm/trunk/test/BugPoint/remove_arguments_test.ll Thu May 16 23:41:04 2019
@@ -1,6 +1,6 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; Test to make sure that arguments are removed from the function if they are
 ; unnecessary. And clean up any types that frees up too.

Modified: llvm/trunk/test/BugPoint/replace-funcs-with-null.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/replace-funcs-with-null.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/replace-funcs-with-null.ll (original)
+++ llvm/trunk/test/BugPoint/replace-funcs-with-null.ll Thu May 16 23:41:04 2019
@@ -1,7 +1,7 @@
 ; Test that bugpoint can reduce the set of functions by replacing them with null.
 ;
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 @foo2 = alias i32 (), i32 ()* @foo
 

Modified: llvm/trunk/test/BugPoint/unsymbolized.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/unsymbolized.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/unsymbolized.ll (original)
+++ llvm/trunk/test/BugPoint/unsymbolized.ll Thu May 16 23:41:04 2019
@@ -1,4 +1,4 @@
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; RUN: echo "import sys" > %t.py
 ; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
 ; RUN: echo "exit(1)" >> %t.py

Modified: llvm/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/CMakeLists.txt (original)
+++ llvm/trunk/test/CMakeLists.txt Thu May 16 23:41:04 2019
@@ -13,6 +13,7 @@ llvm_canonicalize_cmake_booleans(
   LLVM_TOOL_LTO_BUILD
   LLVM_USE_INTEL_JITEVENTS
   LLVM_BUILD_EXAMPLES
+  LLVM_ENABLE_PLUGINS
   )
 
 configure_lit_site_cfg(

Modified: llvm/trunk/test/Feature/load_module.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/load_module.ll?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/Feature/load_module.ll (original)
+++ llvm/trunk/test/Feature/load_module.ll Thu May 16 23:41:04 2019
@@ -1,7 +1,7 @@
 ; PR1318
 ; RUN: opt < %s -load=%llvmshlibdir/LLVMHello%shlibext -hello \
 ; RUN:   -disable-output 2>&1 | grep Hello
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; FIXME: On Cygming, it might fail without building LLVMHello manually.
 
 @junk = global i32 0

Modified: llvm/trunk/test/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg.py?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg.py (original)
+++ llvm/trunk/test/lit.cfg.py Thu May 16 23:41:04 2019
@@ -187,14 +187,8 @@ else:
     config.available_features.add('can-execute')
 
 # Loadable module
-# FIXME: This should be supplied by Makefile or autoconf.
-if sys.platform in ['win32', 'cygwin']:
-    loadable_module = (config.enable_shared == 1)
-else:
-    loadable_module = True
-
-if loadable_module:
-    config.available_features.add('loadable_module')
+if config.has_plugins:
+    config.available_features.add('plugins')
 
 # Static libraries are not built if BUILD_SHARED_LIBS is ON.
 if not config.build_shared_libs and not config.link_llvm_dylib:

Modified: llvm/trunk/test/lit.site.cfg.py.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.site.cfg.py.in?rev=360993&r1=360992&r2=360993&view=diff
==============================================================================
--- llvm/trunk/test/lit.site.cfg.py.in (original)
+++ llvm/trunk/test/lit.site.cfg.py.in Thu May 16 23:41:04 2019
@@ -45,6 +45,7 @@ config.llvm_host_triple = '@LLVM_HOST_TR
 config.host_arch = "@HOST_ARCH@"
 config.have_opt_viewer_modules = @LLVM_HAVE_OPT_VIEWER_MODULES@
 config.libcxx_used = @LLVM_LIBCXX_USED@
+config.has_plugins = @LLVM_ENABLE_PLUGINS@
 
 # Support substitution of the tools_dir with user parameters. This is
 # used when we can't determine the tool dir at configuration time.




More information about the llvm-commits mailing list