24 lines · plain
1; REQUIRES: plugins2; RUN: echo "import sys" > %t.py3; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py4; RUN: echo "exit(1)" >> %t.py5; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s6; RUN: not --crash opt -bugpoint-enable-legacy-pm -load %llvmshlibdir/BugpointPasses%pluginext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s7; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%t.non.existent.opt.binary -opt-args %t.py 2>&1 | FileCheck %s --check-prefix=BAD-OPT8 9; Test that bugpoint disables symbolication on the opt tool to reduce runtime overhead when opt crashes10; CHECK: args = {{.*}}'-disable-symbolication'11 12; Test that opt, when it crashes & is passed -disable-symbolication, doesn't symbolicate.13; In theory this test should maybe be in test/tools/opt or14; test/Transforms, but since there doesn't seem to be another convenient way to15; crash opt, apart from the BugpointPasses dynamic plugin, this is the spot for16; now.17; CRASH-NOT: Signals.inc18 19; BAD-OPT: Specified `opt' binary does not exist: {{.*}}non.existent.opt.binary20define void @f() {21 call void @f()22 ret void23}24