Maven migration (first draft)
This commit is contained in:
parent
da79ac3e1d
commit
fee48b0b50
1711 changed files with 662 additions and 0 deletions
64
legacy/utilities/LoadTesting/scripts/_setTest
Executable file
64
legacy/utilities/LoadTesting/scripts/_setTest
Executable file
|
@ -0,0 +1,64 @@
|
|||
#! /usr/bin/ruby
|
||||
|
||||
=begin
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Select the name of the test that we will be running, based on the directories
|
||||
in testinfo/tests directory.
|
||||
|
||||
Record that selection, along with the desired number of iterations and threads.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
=end
|
||||
|
||||
begin
|
||||
require File.expand_path('subscripts/common', File.dirname(__FILE__))
|
||||
rescue LoadError => e
|
||||
puts e
|
||||
end
|
||||
|
||||
@test_parms_file = "#{@home}/scripts/subscripts/_current_test.rb"
|
||||
|
||||
# Find out what tests we have available
|
||||
def build_test_list()
|
||||
@test_names = []
|
||||
Dir.foreach(test_file('tests')) do |filename|
|
||||
@test_names.push(filename) unless filename[0,1] == "."
|
||||
end
|
||||
@test_names.sort!
|
||||
raise "Found no test directories." if @test_names.length == 0
|
||||
end
|
||||
|
||||
# Write the current version to the file
|
||||
def write_current_test(name, threads, iterations)
|
||||
File.open(@test_parms_file, "w") do |file|
|
||||
file.puts "# what is the current test, and how many times will it run?"
|
||||
file.puts "@test_name = '#{name}'"
|
||||
file.puts "@test_threads = '#{threads}'"
|
||||
file.puts "@test_iterations = '#{iterations}'"
|
||||
end
|
||||
puts "test set to #{name}, #{threads} threads, #{iterations} iterations."
|
||||
end
|
||||
|
||||
#
|
||||
# ---------------------------------------------------------
|
||||
# MAIN ROUTINE
|
||||
# ---------------------------------------------------------
|
||||
#
|
||||
|
||||
build_test_list()
|
||||
|
||||
puts "Enter test number: "
|
||||
@test_names.each_index do |index|
|
||||
puts " #{index+1} = #{@test_names[index]}"
|
||||
end
|
||||
number = STDIN.gets.chomp.to_i
|
||||
|
||||
if number <= 0 || number > @test_names.length
|
||||
puts "UNRECOGNIZED TEST."
|
||||
exit
|
||||
end
|
||||
|
||||
write_current_test(@test_names[number - 1], 1, 1)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue