Method: RunLoop.run

Defined in:
lib/run_loop.rb

.run(options = {}) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/run_loop.rb', line 69

def self.run(options={})

  cloned_options = options.clone

  # We want to use the _exact_ objects that were passed.
  if options[:xcode]
    cloned_options[:xcode] = options[:xcode]
  end

  if options[:simctl]
    cloned_options[:simctl] = options[:simctl]
  end

  # Soon to be unsupported.
  if options[:sim_control]
    cloned_options[:sim_control] = options[:sim_control]
  end

  if options[:xcuitest]
    RunLoop::XCUITest.run(cloned_options)
  else
    if RunLoop::Instruments.new.instruments_app_running?
      raise %q(The Instruments.app is open.

If the Instruments.app is open, the instruments command line tool cannot take
control of your application.

Please quit the Instruments.app and try again.)

    end
    Core.run_with_options(cloned_options)
  end
end