Skip to content

Commit

Permalink
use clear filename for btest
Browse files Browse the repository at this point in the history
`make btest` (bootstraptest/) makes tempfile and run the file.
This patch introduces two changes:

* use fullpath to make easy to find the file (with `ps`)
* `_<line>_<id>` to `_L<line>_N<id>` (`_123_456` is not easy
  to find which is line number).
  • Loading branch information
ko1 committed Oct 13, 2023
1 parent 511571b commit 0f8b296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstraptest/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def get_result_string(opt = '', **argh)
end

def make_srcfile(frozen_string_literal: nil)
filename = "bootstraptest.#{self.path}_#{self.lineno}_#{self.id}.rb"
filename = File.join(Dir.pwd, "btest.#{self.path}_L#{self.lineno}_N#{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
Expand Down

0 comments on commit 0f8b296

Please sign in to comment.