Files
ubicloud/prog/test/base.rb
Enes Cakir c2b282a4ba Exit the CI script if a test failed
One of the drawbacks of the respirate, compared to the primitive
version, is that the primitive one exits when a strand run fails.
However, in the new version, the CI script isn't aware if the respirate
is failing or not. I've implemented early exits for some failed test
cases.
2024-01-31 19:16:00 +03:00

15 lines
283 B
Ruby

# frozen_string_literal: true
class Prog::Test::Base < Prog::Base
def fail_test(msg)
strand.update(exitval: {msg: msg})
hop_failed
end
def update_stack(new_frame)
strand.stack.first.merge!(new_frame)
strand.modified!(:stack)
strand.save_changes
end
end