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.
15 lines
283 B
Ruby
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
|