Skip to content

Commit

Permalink
Add repro script
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jan 17, 2024
1 parent c4a31af commit 6fb7af6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions repro.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
puts "Running on:"
system "ruby -v"

# Set low Xmx to try to increase repro rate
# ENV["TRUFFLERUBYOPT"] = "--vm.Xmx2G"
ENV["TRUFFLERUBYOPT"] = "--vm.Xmx1G"

try = 0
loop do
try += 1
log = "logs/#{$$}_#{try}.log"
# command = "bundle exec rake ci >#{log} 2>&1"
command = "bundle exec rspec --pattern 'spec/**{,/*/**}/*_spec.rb' --color --backtrace --order defined --format documentation >#{log} 2>&1"
puts "Try #{try}, running #{command}"
system command
p $?
if File.binread(log).include? "SegfaultHandler caught a segfault"
abort "SEGFAULT! see log #{log}"
end
end

0 comments on commit 6fb7af6

Please sign in to comment.