llvm.org GIT mirror llvm / 099ec62
[bugpoint] Report non-existent opt binary Bugpoint will keep going even if the opt binary it's given doesn't exist. It should at least alert the user, so it's clear why reductions are failing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324713 91177308-0d34-0410-b5e6-96231b3b80d8 Vedant Kumar 1 year, 6 months ago
2 changed file(s) with 6 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
33 ; RUN: echo "exit(1)" >> %t.py
44 ; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command="%python" -opt-args %t.py | FileCheck %s
55 ; RUN: not --crash opt -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
6 ; 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
67
78 ; Test that bugpoint disables symbolication on the opt tool to reduce runtime overhead when opt crashes
89 ; CHECK: args = {{.*}}'-disable-symbolication'
1415 ; now.
1516 ; CRASH-NOT: Signals.inc
1617
18 ; BAD-OPT: Specified `opt' binary does not exist: {{.*}}non.existent.opt.binary
1719 define void @f() {
1820 call void @f()
1921 ret void
176176 errs() << "Cannot find `opt' in PATH!\n";
177177 return 1;
178178 }
179 if (!sys::fs::exists(tool)) {
180 errs() << "Specified `opt' binary does not exist: " << tool << "\n";
181 return 1;
182 }
179183
180184 std::string Prog;
181185 if (UseValgrind) {