vivo/utilities/LoadTesting/scripts/_mergeTestResults
j2blake 54e3fd4c16 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-22 15:43:05 -04:00

40 lines
1.1 KiB
Ruby
Executable file

#! /usr/bin/ruby
=begin
--------------------------------------------------------------------------------
Look through the test results for the currently-selected version, and merge them
into an HTML file so we can easily compare them.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
=end
require File.expand_path('subscripts/common', File.dirname(__FILE__))
require 'subscripts/test_result_merger'
properties = {}
source_dir = "#{@home}/testinfo/results/#{@site_name}"
properties["source_directory"] = source_dir
properties["target_directory"] = "#{@home}/webpages/"
properties["site_name"] = "#{@site_name}"
suggestions = []
if File.directory?(source_dir)
Dir.chdir(source_dir) do |dir|
if File.file?("fileOrderSuggestions.txt")
File.open("fileOrderSuggestions.txt") do |f|
f.each_line() do |line|
suggestions.push(line.strip())
end
end
end
end
end
properties["file_order_suggestions"] = suggestions
trm = TestResultMerger.new(properties)
trm.merge
puts "TestResultMerger was successful."