class ParallelTests::CLI

def report_failure_rerun_commmand(test_results, options)

def report_failure_rerun_commmand(test_results, options)
  failing_sets = test_results.reject { |r| r[:exit_status] == 0 }
  return if failing_sets.none?
  if options[:verbose]
    puts "\n\nTests have failed for a parallel_test group. Use the following command to run the group again:\n\n"
    failing_sets.each do |failing_set|
      command = failing_set[:command]
      command = command.gsub(/;export [A-Z_]+;/, ' ') # remove ugly export statements
      command = @runner.command_with_seed(command, failing_set[:seed]) if failing_set[:seed]
      puts command
    end
  end
end