diff --git a/repro.rb b/repro.rb new file mode 100644 index 000000000..15636441a --- /dev/null +++ b/repro.rb @@ -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