Sha256: 3e928c3467dae6bc80696cbef4fd642c3a5d03ee44e8d93e8d942bd99ab10270

Contents?: true

Size: 821 Bytes

Versions: 8

Compression:

Stored size: 821 Bytes

Contents

#require 'open3'

TEST = ARGV[0]

STORAGES = %w[ fs dm couch redis beanstalk ].unshift(nil)

unless TEST
  puts %{

USAGE :

  ruby test/functional/vertical.rb path/to/test.rb

will run the given test with against all the storage implementations.

#{STORAGES}

  }
  exit 0
end

STORAGES.each do |storage|

  dashdash = `ruby -v`.match(/^ruby 1\.9\./) ? '' : '--'
  storage = storage.nil? ? '' : "--#{storage}"

  command = "ruby #{TEST} #{dashdash} #{storage}"
  puts('-' * 80)
  puts("#{command}")

  #Open3.popen3("#{command} 2>&1") do |_, stdout, _|
  #  loop do
  #    s = stdout.read(7)
  #    break unless s
  #    $stdout.print(s)
  #    $stdout.flush
  #  end
  #end
    # popen3 is nice, but it doesn't set $?

  puts `#{command} 2>&1`

  puts("\nFAILED\n\n") if $?.exitstatus.to_i != 0
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ruote-2.3.0.3 test/functional/vertical.rb
ruote-maestrodev-2.2.1 test/functional/vertical.rb
ruote-2.3.0.2 test/functional/vertical.rb
ruote-2.3.0.1 test/functional/vertical.rb
ruote-2.3.0 test/functional/vertical.rb
ruote-2.2.0 test/functional/vertical.rb
ruote-2.1.11 test/functional/vertical.rb
ruote-2.1.10 test/functional/vertical.rb