Class: XCKnife::Runner
- Inherits:
-
Object
- Object
- XCKnife::Runner
- Includes:
- XCToolCmdHelper
- Defined in:
- lib/xcknife/runner.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Methods included from XCToolCmdHelper
#only_arguments, #only_arguments_for_a_partition_set, #xcodebuild_only_arguments, #xcodebuild_only_arguments_for_a_partition_set, #xcodebuild_skip_arguments, #xctool_only_arguments, #xctool_only_arguments_for_a_partition_set
Constructor Details
#initialize(args) ⇒ Runner
Returns a new instance of Runner.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/xcknife/runner.rb', line 13 def initialize(args) @abbreviated_output = false @xcodebuild_output = false @partitions = [] @partition_names = [] @worker_count = nil @historical_timings_file = nil @current_tests_file = nil @output_file_name = nil parse_arguments(args) end |
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
11 12 13 |
# File 'lib/xcknife/runner.rb', line 11 def parser @parser end |
Class Method Details
.invoke ⇒ Object
7 8 9 |
# File 'lib/xcknife/runner.rb', line 7 def self.invoke new(ARGV).run end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/xcknife/runner.rb', line 25 def run stream_parser = XCKnife::StreamParser.new(@worker_count, @partitions) result = stream_parser.compute_shards_for_file(@historical_timings_file, @current_tests_file) data = @abbreviated_output ? gen_abbreviated_output(result) : gen_full_output(result) write_output(data) rescue XCKnife::XCKnifeError => e warn "Error: #{e}" exit 1 end |