Sha256: 3da7a1a88ef441392ab9bcba674b3607fc45b20b81af33c7ba1fe91c08be9f6a

Contents?: true

Size: 602 Bytes

Versions: 9

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

count = ARGV[0] ? ARGV[0].to_i : 100
test_name = ARGV[1]

$test_cmd = +'ruby test/run.rb  --name test_signal_handler_trace'
if test_name
  $test_cmd << " --name #{test_name}"
end

def run_test(count)
  puts "#{count}: running tests..."
  # sleep 1
  system($test_cmd)
  puts

  return if $?.exitstatus == 0

  puts "Failure after #{count} tests"
  exit!
end

trap('INT') { exit! }
t0 = Time.now
count.times do |i|
  run_test(i + 1)
end
elapsed = Time.now - t0
puts format(
  "Successfully ran %d tests in %f seconds (%f per test)",
  count,
  elapsed,
  elapsed / count
)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
polyphony-0.99 test/stress.rb
polyphony-0.98 test/stress.rb
polyphony-0.97 test/stress.rb
polyphony-0.96 test/stress.rb
polyphony-0.95 test/stress.rb
polyphony-0.94 test/stress.rb
polyphony-0.93 test/stress.rb
polyphony-0.92 test/stress.rb
polyphony-0.91 test/stress.rb