76 lines
2.2 KiB
Ruby
Executable File
76 lines
2.2 KiB
Ruby
Executable File
#
|
|
# File:: %RS_TOOLSLIB%/util/test/test_ragebuilder_log_parsing.rb
|
|
# Description:: Test Ragebuilder TTY parsing for pipeline.
|
|
#
|
|
# Author:: David Muir <david.muir@rockstarnorth.com>
|
|
# Date:: 22 May 2013
|
|
#
|
|
# Usage:
|
|
# %RS_TOOLSIR% test_ragebuilder_log_parsing.rb <filename>
|
|
#
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Uses
|
|
#-----------------------------------------------------------------------------
|
|
require 'RSG.Base.dll'
|
|
require 'RSG.Base.Configuration.dll'
|
|
require 'RSG.Base.Windows.dll'
|
|
require 'RSG.Pipeline.Services.dll'
|
|
include RSG::Base::Configuration
|
|
include RSG::Base::Logging
|
|
include RSG::Base::Logging::Universal
|
|
include RSG::Base::OS
|
|
include RSG::Base::Windows
|
|
include RSG::Pipeline::Services
|
|
|
|
require 'mscorlib'
|
|
require 'System.Core'
|
|
include System::Collections::Generic
|
|
include System::IO
|
|
using_clr_extensions System::Linq
|
|
|
|
require 'pipeline/os/options'
|
|
include Pipeline
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Constants
|
|
#-----------------------------------------------------------------------------
|
|
AUTHOR = 'RSGEDI Tools'
|
|
EMAIL = 'RSGEDI Tools <*tools@rockstarnorth.com>'
|
|
OPTIONS = [
|
|
]
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Entry-Point
|
|
#-----------------------------------------------------------------------------
|
|
if ( __FILE__ == $0 ) then
|
|
|
|
# Initialise log and console output.
|
|
LogFactory.CreateApplicationConsoleLogTarget( )
|
|
g_Log = LogFactory.ApplicationLog
|
|
g_Options = OS::Options::new( OPTIONS )
|
|
begin
|
|
|
|
g_Options.trailing.each do |filename|
|
|
|
|
RSG::Pipeline::Services::Platform::Ragebuilder::ParseRagebuilderOutput(
|
|
g_Options.command_options.Branch, g_Log, filename, false, 10 * 1024 * 1024 )
|
|
end
|
|
|
|
rescue SystemExit => ex
|
|
|
|
LogFactory.ApplicationShutdown()
|
|
exit( ex.status )
|
|
|
|
rescue Exception => ex
|
|
|
|
g_Log.Exception( ex, "Exception during #{__FILE__}." )
|
|
|
|
puts "Exception during #{__FILE__}: #{ex.message}"
|
|
puts ex.backtrace.join("\n")
|
|
|
|
exit( 1 )
|
|
end
|
|
end
|
|
|