lib/testlab/utility/logger.rb in testlab-1.21.0 vs lib/testlab/utility/logger.rb in testlab-1.21.1
- old
+ new
@@ -29,16 +29,19 @@
"version" => TestLab::VERSION.inspect,
}
end
def log_details(testlab)
+ @command ||= ZTK::Command.new(:silence => true, :ignore_exit_status => true)
+
{
"hostname" => "%s (%s)" % [Socket.gethostname.inspect, TestLab.hostname.inspect],
"program" => $0.to_s.inspect,
"argv" => ARGV.join(' ').inspect,
"timezone" => Time.now.zone.inspect,
- "user" => ENV['USER'].inspect
+ "user" => ENV['USER'].inspect,
+ "uname" => @command.exec(%(uname -a)).output.strip.inspect
}
end
def log_ruby(testlab)
dependencies = {
@@ -65,10 +68,10 @@
dependencies
end
def log_external_dependencies(testlab)
- @command = ZTK::Command.new(:silence => true, :ignore_exit_status => true)
+ @command ||= ZTK::Command.new(:silence => true, :ignore_exit_status => true)
{
"vagrant_version" => @command.exec(%(/usr/bin/env vagrant --version)).output.strip.inspect,
"virtualbox_version" => @command.exec(%(/usr/bin/env vboxmanage --version)).output.strip.inspect,
"lxc_version" => @command.exec(%(/usr/bin/env lxc-version)).output.strip.inspect