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

@ -1,4 +0,0 @@
# what is the current test, and how many times will it run?
@test_name = 'SimpleTests'
@test_threads = '1'
@test_iterations = '40'

View file

@ -1,2 +0,0 @@
# what is the current version under test?
@version_name = 'cornell1.4'

View file

@ -0,0 +1,33 @@
#
# The path to the LoadTesting directory. Everything is based on this
#
@home = File.expand_path("../..", File.dirname(__FILE__))
#
# 'require' should look in the scripts directory
#
$: << File.expand_path('scripts', @home)
#
# convenience methods to access files
#
def version_file(path)
"#{@home}/versions/#{@version_name}/#{path}"
end
def distro_file(path)
"#{@home}/distros/#{@distro_name}/#{path}"
end
def site_file(path)
"#{@home}/sites/#{@site_name}/#{path}"
end
def test_file(path)
"#{@home}/testinfo/#{path}"
end
#
# All of the scripts need to load these parms. (Except _setVersion and _setTest)
#
require 'subscripts/loadParms'

View file

@ -1,6 +1,6 @@
require "#{File.dirname(__FILE__)}/_current_version"
require "#{File.dirname(__FILE__)}/_current_test"
require "/home/jeb228/LoadTesting/versions/#{@version_name}/version_properties"
require "/home/jeb228/LoadTesting/distros/#{@distro_name}/distro_properties"
require "/home/jeb228/LoadTesting/sites/#{@site_name}/site_properties"
require 'subscripts/_current_version'
require 'subscripts/_current_test'
require version_file('version_properties')
require distro_file('distro_properties')
require site_file('site_properties')