Skip to content

Commit

Permalink
support skip in bootstraptest
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1 committed Dec 15, 2023
1 parent 5a66ea2 commit 9b4cb69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bootstraptest/runner.rb
Expand Up @@ -552,8 +552,13 @@ def make_srcfile(frozen_string_literal: nil)
filename = "bootstraptest.#{self.path}_#{self.lineno}_#{self.id}.rb"
File.open(filename, 'w') {|f|
f.puts "#frozen_string_literal:true" if frozen_string_literal
f.puts "GC.stress = true" if $stress
f.puts "print(begin; #{self.src}; end)"
if $stress
f.puts "GC.stress = true" if $stress
else
f.puts ""
end
f.puts "class BT_Skip < Exception; end; def skip(msg) = raise(BT_Skip, msg.to_s)"
f.puts "print(begin; #{self.src}; rescue BT_Skip; $!.message; end)"
}
filename
end
Expand Down

0 comments on commit 9b4cb69

Please sign in to comment.