Sha256: cb992085a6b904ddfc81bc015cfe80445e1886cb29dd279ba7e4ab32d806ac0b

Contents?: true

Size: 810 Bytes

Versions: 3

Compression:

Stored size: 810 Bytes

Contents

require 'rbconfig'
require 'test/unit'

if Rake.application.num_threads > 1
  class TestSimpleParallel < Test::Unit::TestCase
    def test_1
      here = File.dirname(__FILE__)
      rake = File.expand_path("#{here}/../bin/rake")

      ENV["RUBYLIB"] = lambda {
        lib = File.expand_path("#{here}/../lib")
        current = ENV["RUBYLIB"]
        sep = Rake.application.windows? ? ";" : ":"
        if current
          "#{lib}#{sep}#{current}"
        else
          lib
        end
      }.call
      
      [
       "Rakefile.simple",
       "Rakefile.seq",
      ].each { |file|
        (1..5).each { |n|
          args = [rake, "--threads", n.to_s, "-f", "test/#{file}"]
          puts("\n" + "-"*40)
          puts(args.join(" "))
          assert(ruby(*args))
        }
      }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
drake-0.8.4.1.0.16 test/test_parallel.rb
drake-0.8.4.1.0.17 test/test_parallel.rb
drake-0.8.4.1.0.18 test/test_parallel.rb