lib/atp/ast/builder.rb in atp-0.3.2 vs lib/atp/ast/builder.rb in atp-0.3.3

- old
+ new

@@ -49,10 +49,14 @@ def job(id, enabled, node) n(:job, id, enabled, node) end + def set_run_flag(flag) + n(:set_run_flag, flag) + end + def enable_flow_flag(var, options = {}) test = n(:enable_flow_flag, var) if options[:conditions] apply_conditions(test, options[:conditions]) else @@ -201,17 +205,23 @@ def on_fail(options = {}) children = [] if options[:bin] || options[:softbin] children << set_result(:fail, bin: options[:bin], softbin: options[:softbin], bin_description: options[:bin_description]) end + if options[:set_run_flag] || options[:set_flag] + children << set_run_flag(options[:set_run_flag] || options[:set_flag]) + end children << continue if options[:continue] n(:on_fail, *children) end def on_pass(options = {}) children = [] if options[:bin] || options[:softbin] children << set_result(:pass, bin: options[:bin], softbin: options[:softbin], bin_description: options[:bin_description]) + end + if options[:set_run_flag] || options[:set_flag] + children << set_run_flag(options[:set_run_flag] || options[:set_flag]) end children << continue if options[:continue] n(:on_pass, *children) end