llvm.org GIT mirror llvm / b5581c4
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360993 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 3 months ago
14 changed file(s) with 15 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --output-prefix %t %s | FileCheck %s
1 ; REQUIRES: loadable_module
1 ; REQUIRES: plugins
22
33 ; Test that arguments are correctly passed in --compile-command. The output
44 ; of bugpoint includes the output of the custom tool, so we just echo the args
0 ; Test that bugpoint can narrow down the testcase to the important function
11 ;
22 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
3 ; REQUIRES: loadable_module
3 ; REQUIRES: plugins
44
55 define i32 @foo() { ret i32 1 }
66
0 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
11 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
2 ; REQUIRES: loadable_module
2 ; REQUIRES: plugins
33
44 ; CHECK: f() #[[ATTRS:[0-9]+]]
55 define void @f() #0 {
0 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
11 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
2 ; REQUIRES: loadable_module
2 ; REQUIRES: plugins
33
44 ; CHECK: f() #[[ATTRS:[0-9]+]]
55 define void @f() #0 {
0 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
1 ; REQUIRES: loadable_module
1 ; REQUIRES: plugins
22 ; CHECK: DICompileUnit not listed in llvm.dbg.cu
33
44 ; When bugpoint hacks at this testcase it will at one point create illegal IR
None ; REQUIRES: loadable_module
0 ; REQUIRES: plugins
11 ; 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
22 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
33 ;
11 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
22 ; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null
33 ; RUN-DISABLE: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
4 ; REQUIRES: loadable_module
4 ; REQUIRES: plugins
55
66 ; CHECK: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]]}
77 ; CHECK-DISABLE: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]],
0 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
11 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
2 ; REQUIRES: loadable_module
2 ; REQUIRES: plugins
33
44 ; Test to make sure that arguments are removed from the function if they are
55 ; unnecessary. And clean up any types that frees up too.
0 ; Test that bugpoint can reduce the set of functions by replacing them with null.
11 ;
22 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
3 ; REQUIRES: loadable_module
3 ; REQUIRES: plugins
44
55 @foo2 = alias i32 (), i32 ()* @foo
66
None ; REQUIRES: loadable_module
0 ; REQUIRES: plugins
11 ; RUN: echo "import sys" > %t.py
22 ; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
33 ; RUN: echo "exit(1)" >> %t.py
1212 LLVM_TOOL_LTO_BUILD
1313 LLVM_USE_INTEL_JITEVENTS
1414 LLVM_BUILD_EXAMPLES
15 LLVM_ENABLE_PLUGINS
1516 )
1617
1718 configure_lit_site_cfg(
0 ; PR1318
11 ; RUN: opt < %s -load=%llvmshlibdir/LLVMHello%shlibext -hello \
22 ; RUN: -disable-output 2>&1 | grep Hello
3 ; REQUIRES: loadable_module
3 ; REQUIRES: plugins
44 ; FIXME: On Cygming, it might fail without building LLVMHello manually.
55
66 @junk = global i32 0
186186 config.available_features.add('can-execute')
187187
188188 # Loadable module
189 # FIXME: This should be supplied by Makefile or autoconf.
190 if sys.platform in ['win32', 'cygwin']:
191 loadable_module = (config.enable_shared == 1)
192 else:
193 loadable_module = True
194
195 if loadable_module:
196 config.available_features.add('loadable_module')
189 if config.has_plugins:
190 config.available_features.add('plugins')
197191
198192 # Static libraries are not built if BUILD_SHARED_LIBS is ON.
199193 if not config.build_shared_libs and not config.link_llvm_dylib:
4444 config.host_arch = "@HOST_ARCH@"
4545 config.have_opt_viewer_modules = @LLVM_HAVE_OPT_VIEWER_MODULES@
4646 config.libcxx_used = @LLVM_LIBCXX_USED@
47 config.has_plugins = @LLVM_ENABLE_PLUGINS@
4748
4849 # Support substitution of the tools_dir with user parameters. This is
4950 # used when we can't determine the tool dir at configuration time.