Sha256: 62d1b9096ccd70391ddde8aa004e3ed9fc11e9262ea56aa52dd777dd1d8bb45b

Contents?: true

Size: 1019 Bytes

Versions: 27

Compression:

Stored size: 1019 Bytes

Contents

module Multiverse
  module Runner
    extend self
    extend Color

    def exit_status
      @exit_status ||= 0
    end

    def notice_exit_status(i)
      exit_status # initialize it
      # we don't want to return exit statuses > 256 since these get converted
      # to 0
      if i != 0
        puts red("FAIL! Exited #{i}")
        @exit_status = 1
      else
        puts green("PASS. Exited #{i}")
      end
      @exit_status
    end

    def run(filter="")
      Dir.new(SUITES_DIRECTORY).entries.each do |dir|
        next if dir =~ /\A\./
        next unless dir.include? filter
        full_path = File.join(SUITES_DIRECTORY, dir)
        begin
          suite = Suite.new full_path
          suite.execute
        rescue => e
          puts red("Error when trying to run suite in #{full_path.inspect}")
          puts
          puts "#{e.class}: #{e}"
          puts *e.backtrace
          notice_exit_status 1
        end
      end

      OutputCollector.report
      exit exit_status
    end
  end
end

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
wd_newrelic_rpm-3.5.8 test/multiverse/lib/multiverse/runner.rb
sundawg_newrelic_rpm-3.5.8.2 test/multiverse/lib/multiverse/runner.rb
sundawg_newrelic_rpm-3.5.8.1 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.8.72 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.8.70 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.8.64.beta test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.7.59 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.7.59.beta test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.7.58.beta test/multiverse/lib/multiverse/runner.rb
wd_newrelic_rpm-3.5.6 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.7.57.beta test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.6.55 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.6.48.beta test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.6.46.beta test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.6.42.beta test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.5.39.beta test/multiverse/lib/multiverse/runner.rb
wd_newrelic_rpm-3.5.5 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.5.38 test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.5.540.dev test/multiverse/lib/multiverse/runner.rb
newrelic_rpm-3.5.4.35.beta test/multiverse/lib/multiverse/runner.rb