class ParallelTests::Test::Runner
def execute_command_and_capture_output(env, cmd, silence)
def execute_command_and_capture_output(env, cmd, silence) # make processes descriptive / visible in ps -ef windows = RbConfig::CONFIG['host_os'] =~ /win32/ separator = windows ? ' & ' : ';' exports = env.map do |k,v| if windows "(SET \"#{k}=#{v}\")" else "#{k}=#{v};export #{k}" end end.join(separator) cmd = "#{exports}#{separator}#{cmd}" output = open("|#{cmd}", "r") { |output| capture_output(output, silence) } exitstatus = $?.exitstatus {:stdout => output, :exit_status => exitstatus} end