[PATCH compass-ci] delimiter: bisect run script catch the exceptions and exit -1

Git bisect tag the commit good/bad/skip according to the bisect run script exit code. Exit code 0 is good, 125 is skip, the others between 1 and 127 is bad. When the ruby script raise a exception exit code is 1, git bisect will tag the commit to bad, but we should abort the bisect process. So we catch the exceptions and exit -1 in bisect run script. Signed-off-by: Cao Xueliang <caoxl78320@163.com> --- src/delimiter/find-commit/bisect_run_script.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/delimiter/find-commit/bisect_run_script.rb b/src/delimiter/find-commit/bisect_run_script.rb index 4877d79..8cdf675 100755 --- a/src/delimiter/find-commit/bisect_run_script.rb +++ b/src/delimiter/find-commit/bisect_run_script.rb @@ -36,9 +36,13 @@ class GitBisectRun end end -job_id = ARGV[0] -error_id = ARGV[1] -work_dir = ARGV[2] - -run = GitBisectRun.new job_id, error_id, work_dir -run.git_bisect +begin + job_id = ARGV[0] + error_id = ARGV[1] + work_dir = ARGV[2] + + run = GitBisectRun.new job_id, error_id, work_dir + run.git_bisect +rescue + exit -1 +end -- 2.23.0
participants (1)
-
Cao Xueliang