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', __dir__) non_parallel = (options[:non_parallel] ? ' --non-parallel' : '') command = "#{ParallelTests.with_ruby_binary(Shellwords.escape(executable))} --exec '#{cmd}'#{count}#{non_parallel}" abort unless system(command) end