
12 Nov
2020
12 Nov
'20
11:32 a.m.
+ def sh_on_fail(job = nil)
Call it only if the job has 'on_fail' field? Better, what if we are to define functions for more on_xxx fields in future? So can make the logic general now. Thanks, Fengguang
+ @script_lines = [] + + @programs = available_programs(:workload_elements) + + job ||= (@jobx || @job).clone + + @cur_func = :on_fail + + out_line 'on_fail()' + out_line '{' + out_line + out_line "\t. $LKP_SRC/lib/job.sh" + out_line "\t. $LKP_SRC/lib/env.sh" + out_line + parse_hash [], job['on_fail'] + out_line "}" end end -- 2.23.0