-
-
Save listrophy/f7309ce2f3b3dfce56e8 to your computer and use it in GitHub Desktop.
ruby isn't streaming instruments output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :test => :coffeescript do | |
template = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate' | |
app = '~/dev/ios/TravisCI/build/TravisCI.app' | |
variables = { | |
'UIASCRIPT' => '~/dev/ios/TravisCI/automation/uiautomation.js', | |
'UIARESULTSPATH' => '~/dev/ios/TravisCI/automation/results' | |
}.map{|key,val| "-e #{key} #{val}"}.join(' ') | |
STDOUT.sync = true | |
Open3.popen2e("instruments -t #{template} #{app} #{variables}") do |stdin, stdout, wait_thr| | |
stdout.each_line do |line| | |
puts line | |
end | |
puts "status: #{wait_thr.value}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment