module ParallelTests::Tasks
def run_in_parallel(cmd, options={})
def run_in_parallel(cmd, options={}) load_lib count = " -n #{options[:count]}" unless options[:count].to_s.empty? # Using the relative path to find the binary allow to run a specific version of it executable = File.expand_path("../../../bin/parallel_test", __FILE__) command = "#{ParallelTests.with_ruby_binary(Shellwords.escape(executable))} --exec '#{cmd}'#{count}#{' --non-parallel' if options[:non_parallel]}" abort unless system(command) end