bin/tl in testlab-1.21.1 vs bin/tl in testlab-1.22.0
- old
+ new
@@ -104,11 +104,15 @@
@verbose = ((ENV['VERBOSE'] == '1') || (global[:verbose] == true))
@quiet = ((ENV['QUIET'] == '1') || (global[:quiet] == true))
(@verbose == true) and (ENV['LOG_LEVEL'] = 'DEBUG')
- File.exists?(global[:log]) and FileUtils.move(global[:log], DEFAULT_LOG_BACKUP)
+ File.exists?(global[:log]) and FileUtils.rm_f(global[:log])
+ Dir[DEFAULT_LOG_GLOB].each do |log_filename|
+ File.exists?(log_filename) and FileUtils.rm_f(log_filename)
+ end
+
logger = ZTK::Logger.new(global[:log])
if ((@verbose == true) || (@quiet == false))
logger.loggers << ::Logger.new(STDOUT)
end
@@ -183,11 +187,16 @@
@ui.logger << "#{line}\n"
end
message = format_message("TestLab v#{TestLab::VERSION} Aborted (%0.4f seconds)".black.bold % testlab_run_time)
dump_file.puts(ZTK::ANSI.uncolor(message))
+ dump_file.close
+
@ui.stderr.puts(message)
@ui.logger.info { message }
+
+ @ui.stderr.puts
+ commands[:bugreport] and commands[:bugreport].execute({}, {}, [])
false
end
end