vivo/utilities/LoadTesting/scripts/subscripts/common.rb
j2blake 4f085bcdfe Update the LoadTesting framework.
Permit use of Git while still supporting Subversion. Improve the script structure and reduce dependence on hard-coded paths.
2013-10-21 15:21:54 -04:00

33 lines
655 B
Ruby

#
# 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'