Maven migration (first draft)
This commit is contained in:
parent
da79ac3e1d
commit
fee48b0b50
1711 changed files with 662 additions and 0 deletions
44
legacy/utilities/LoadTesting/scripts/_captureTomcatLogs
Executable file
44
legacy/utilities/LoadTesting/scripts/_captureTomcatLogs
Executable file
|
@ -0,0 +1,44 @@
|
|||
#! /usr/bin/ruby
|
||||
|
||||
=begin
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Copy the Tomcat logs into a time-stamped directory in the current "version"
|
||||
directory, for possible inspection later.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
=end
|
||||
|
||||
require File.expand_path('subscripts/common', File.dirname(__FILE__))
|
||||
require 'date'
|
||||
require "#{File.dirname(__FILE__)}/subscripts/loadParms"
|
||||
|
||||
def figure_time_stamp()
|
||||
return DateTime.now.strftime("%Y-%m-%d_%H-%M-%S")
|
||||
end
|
||||
|
||||
def add_read_me()
|
||||
puts "Add a comment for the README.txt file"
|
||||
comment = STDIN.gets.strip
|
||||
return if comment.empty?
|
||||
|
||||
File.open('README.txt', "w") do |file|
|
||||
file.puts comment
|
||||
end
|
||||
end
|
||||
|
||||
@tomcat_logs_dir = version_file('tomcatLogs')
|
||||
if (! File.directory?(@tomcat_logs_dir))
|
||||
Dir.mkdir(@tomcat_logs_dir)
|
||||
end
|
||||
|
||||
Dir.chdir(@tomcat_logs_dir) do |path|
|
||||
@this_logs_dir = "#{path}/#{figure_time_stamp()}"
|
||||
Dir.mkdir(@this_logs_dir)
|
||||
end
|
||||
|
||||
Dir.chdir(@this_logs_dir) do |path|
|
||||
system("cp #{@home}/tomcat/logs/* .")
|
||||
add_read_me()
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue