Sha256: f4a27b9b902d40ec61047214f72fbf7e902ec74185488a1c9abc060fa95990ce

Contents?: true

Size: 607 Bytes

Versions: 15

Compression:

Stored size: 607 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_cross_thread_send_receive'
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

15 entries across 15 versions & 1 rubygems

Version Path
polyphony-0.90 test/stress.rb
polyphony-0.89 test/stress.rb
polyphony-0.87 test/stress.rb
polyphony-0.86 test/stress.rb
polyphony-0.85 test/stress.rb
polyphony-0.84.1 test/stress.rb
polyphony-0.84 test/stress.rb
polyphony-0.83 test/stress.rb
polyphony-0.82 test/stress.rb
polyphony-0.81.1 test/stress.rb
polyphony-0.81 test/stress.rb
polyphony-0.80 test/stress.rb
polyphony-0.79 test/stress.rb
polyphony-0.78 test/stress.rb
polyphony-0.77 test/stress.rb