Sha256: 69287930d4de26e9e32454925748078dd8a66af91a7a9c839426bb3ceca25fbe

Contents?: true

Size: 568 Bytes

Versions: 13

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

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

$test_cmd = +'ruby test/run.rb'
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

13 entries across 13 versions & 1 rubygems

Version Path
polyphony-1.0.2 test/stress.rb
polyphony-1.0.1 test/stress.rb
polyphony-1.0 test/stress.rb
polyphony-0.99.6 test/stress.rb
polyphony-0.99.5 test/stress.rb
polyphony-0.99.4 test/stress.rb
polyphony-0.99.3 test/stress.rb
polyphony-0.99.2 test/stress.rb
polyphony-0.99.1 test/stress.rb
polyphony-0.70 test/stress.rb
polyphony-0.69 test/stress.rb
polyphony-0.68 test/stress.rb
polyphony-0.67 test/stress.rb