Created
March 5, 2015 14:43
-
-
Save bjfish/75d144f88c5870053fc2 to your computer and use it in GitHub Desktop.
Just run each directory in core with a 90 second timeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'timeout' | |
files = Dir.glob("spec/ruby/core/*/") | |
files.map! {|x| x[0..-2] } | |
files.each do |file| | |
command = "ruby tool/jt.rb untag #{file}" | |
puts "starting process #{command}" | |
pid = Process.spawn(command) | |
begin | |
Timeout.timeout(90) do | |
puts "waiting for the #{file} process to end" | |
Process.wait(pid) | |
puts 'process #{file} finished in time' | |
end | |
rescue Timeout::Error | |
puts "process #{file} not finished in time, killing it" | |
Process.kill('TERM', pid) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment