class RRRSpec::Client::ClientConfiguration

Attributes

least_timeout_sec[RW]
max_trials[RW]
max_workers[RW]
packaging_dir[RW]
rrrspec_web_base[RW]
rsync_options[RW]
rsync_remote_path[RW]
setup_command[RW]
slave_command[RW]
spec_files[W]
taskset_class[RW]
unknown_spec_timeout_sec[RW]
worker_type[RW]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/rrrspec/client/configuration.rb, line 21
def initialize
  super()
  @type = :client
  @unknown_spec_timeout_sec = 5 * 60
  @least_timeout_sec = 30
end

Public Instance Methods

check_validity() click to toggle source
Calls superclass method
# File lib/rrrspec/client/configuration.rb, line 28
def check_validity
  validity = super

  unless Dir.exist?(packaging_dir)
    $stderr.puts("The packaging_dir does not exists: '#{packaging_dir}'")
    validity = false
  end

  unless spec_files.is_a?(Array)
    $stderr.puts("The spec_files should be an Array: '#{spec_files}'")
    validity = false
  else
    spec_files.each do |filepath|
      unless File.exist?(File.join(packaging_dir, filepath))
        $stderr.puts("One of the spec_files does not exists '#{filepath}'")
        validity = false
      end
    end
  end

  unless max_workers.is_a?(Integer)
    $stderr.puts("The max_workers should be an Integer: '#{max_workers}'")
    validity = false
  else
    unless max_workers >= 1
      $stderr.puts("The max_workers should not be less than 1: #{max_workers}")
      validity = false
    end
  end

  unless max_trials.is_a?(Integer)
    $stderr.puts("The max_trials should be an Integer: '#{max_trials}'")
    validity = false
  end

  unless taskset_class.is_a?(String)
    $stderr.puts("The taskset_class should be a String: '#{taskset_class}'")
    validity = false
  end

  unless unknown_spec_timeout_sec.is_a?(Integer)
    $stderr.puts("The unknown_spec_timeout_sec should be an Integer: '#{unknown_spec_timeout_sec}'")
    validity = false
  end

  unless least_timeout_sec.is_a?(Integer)
    $stderr.puts("The least_timeout_sec should be an Integer: '#{least_timeout_sec}'")
    validity = false
  end

  validity
end
spec_files() click to toggle source
# File lib/rrrspec/client/configuration.rb, line 13
def spec_files
  case @spec_files
  when Proc then @spec_files.call
  when String then [@spec_files]
  else @spec_files
  end
end