lib/puppet_litmus/rake_helper.rb
# Executes a command on the test runner.
#
# @param command [String] command to execute.
# @return [Object] the standard out stream.
Executes a command on the test runner.
Executes a command on the test runner .
def run_local_command(command)
    Honeycomb.start_span(name: 'litmus.run_local_command') do |span|
      ENV['HONEYCOMB_TRACE'] = span.to_trace_header
      span.add_field('litmus.command', command)
      require 'open3'
      stdout, stderr, status = Open3.capture3(command)
      error_message = "Attempted to run\ncommand:'#{command}'\nstdout:#{stdout}\nstderr:#{stderr}"
      raise error_message unless status.to_i.zero?
      stdout
    end
  end
def run_local_command ( command ) Honeycomb . start_span ( name : 'litmus.run_local_command' ) do | span | ENV [ 'HONEYCOMB_TRACE' ] = span . to_trace_header span . add_field ( 'litmus.command' , command ) require 'open3' stdout , stderr , status = Open3 . capture3 ( command ) error_message = "Attempted to run\ncommand:'#{command}'\nstdout:#{stdout}\nstderr:#{stderr}" raise error_message unless status . to_i . zero? stdout end end
Executes a command on the test runner.
Executes a command on the test runner .
the standard out stream.
the standard out stream .
Object
command
command to execute.
command to execute .