Class: Albacore::TestRunner::Cmd

Inherits:
Object
  • Object
show all
Includes:
CrossPlatformCmd
Defined in:
lib/albacore/task_types/test_runner.rb

Constant Summary

Constants included from CrossPlatformCmd

CrossPlatformCmd::KILL_TIMEOUT

Instance Attribute Summary

Attributes included from CrossPlatformCmd

#pid

Instance Method Summary collapse

Methods included from CrossPlatformCmd

#chdir, #make_command, #normalise_slashes, #sh, #shie, #stop, #system, #which

Methods included from Logging

#debug, #err, #error, #fatal, #info, #puts, #trace, #warn

Constructor Details

#initialize(work_dir, executable, parameters, files, clr_command = true) ⇒ Cmd

expects both parameters and executable to be relative to the work_dir parameter



88
89
90
91
92
93
94
95
96
97
# File 'lib/albacore/task_types/test_runner.rb', line 88

def initialize work_dir, executable, parameters, files, clr_command = true
  @work_dir, @executable = work_dir, executable
  if files.respond_to? :each
    @parameters = files.to_a.concat(parameters.to_a)
  else
    @parameters = parameters.to_a.unshift(files)
  end

  @clr_command = clr_command
end

Instance Method Details

#executeObject



99
100
101
102
103
104
105
# File 'lib/albacore/task_types/test_runner.rb', line 99

def execute
  info { "executing in directory '#{@work_dir}'" }
  system @executable,
    @parameters,
    :work_dir    => @work_dir,
    :clr_command => @clr_command
end