Update the LoadTesting framework.

Permit use of Git while still supporting Subversion. Improve the script structure and reduce dependence on hard-coded paths.
This commit is contained in:
j2blake 2013-10-21 15:21:54 -04:00
parent f382ec0468
commit 4f085bcdfe
20 changed files with 120 additions and 70 deletions

View file

@ -10,18 +10,16 @@ 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
Dir.chdir("/home/jeb228/LoadTesting/versions/#{@version_name}") do |path|
@tomcat_logs_dir = "#{path}/tomcatLogs"
if (! File.directory?(@tomcat_logs_dir))
Dir.mkdir(@tomcat_logs_dir)
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|
@ -30,6 +28,6 @@ Dir.chdir(@tomcat_logs_dir) do |path|
end
Dir.chdir(@this_logs_dir) do |path|
system('cp ~/LoadTesting/tomcat/logs/* .')
system("cp #{@home}/tomcat/logs/* .")
end