blob: da26b9dc4808aa75fd93e3bf9f5f84ef4bc8aafe [file] [log] [blame]
David Blaikie5dc796d2017-06-09 07:29:03 +00001; REQUIRES: loadable_module
2; RUN: echo "import sys" > %t.py
3; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
4; RUN: echo "exit(1)" >> %t.py
Stella Stamenovaa27199d2018-08-06 22:37:44 +00005; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s
David Blaikie5dc796d2017-06-09 07:29:03 +00006; RUN: not --crash opt -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
Vedant Kumar099ec622018-02-09 06:09:15 +00007; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%t.non.existent.opt.binary -opt-args %t.py 2>&1 | FileCheck %s --check-prefix=BAD-OPT
David Blaikie5dc796d2017-06-09 07:29:03 +00008
9; Test that bugpoint disables symbolication on the opt tool to reduce runtime overhead when opt crashes
10; 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 or
14; test/Transforms, but since there doesn't seem to be another convenient way to
15; crash opt, apart from the BugpointPasses dynamic plugin, this is the spot for
16; now.
17; CRASH-NOT: Signals.inc
18
Vedant Kumar099ec622018-02-09 06:09:15 +000019; BAD-OPT: Specified `opt' binary does not exist: {{.*}}non.existent.opt.binary
David Blaikie5dc796d2017-06-09 07:29:03 +000020define void @f() {
21 call void @f()
22 ret void
23}