Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_runner/run fix for Instruments 6.0 #74

Closed
bwright2810 opened this issue Sep 22, 2014 · 3 comments
Closed

test_runner/run fix for Instruments 6.0 #74

bwright2810 opened this issue Sep 22, 2014 · 3 comments

Comments

@bwright2810
Copy link
Contributor

It appears that the new Instruments version (6.0) alters its folder structure slightly, which is causing the run script in test_runner to fail. I understand this script is deprecated, but I still use it and others may too. The line I changed to fix it for myself was:

#AutomationInstrument.bundle becomes AutomationInstrument.xrplugin in the path with Instruments 6.0
TEMPLATE = `[ -f /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate ] && echo "#{SDKROOT}/Developer/Library/Instruments/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate" || echo "#{XCODE_ROOT}/../Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate"`.chomp.sub(/^\s+/, "")

#old code
#TEMPLATE = `[ -f /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate ] && echo "#{SDKROOT}/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" || echo "#{XCODE_ROOT}/../Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate"`.chomp.sub(/^\s+/, "")

Just giving you guys a heads-up.

@alexvollmer
Copy link
Collaborator

Thanks for heads-up. If you want to package this up into a patch and send me a pull-request, I'd be happy to merge it.

@Acludia
Copy link

Acludia commented Sep 24, 2014

@bwright2810 Really glad to see I am not the only one who still enjoys using the testrunner haha.
After you made this change were your scripts/automation able to run without any other changes?

I've noticed some odd behavior in terms of device selection and I came across this blog post yesterday. I haven't had a chance to test this solution myself but I was hoping to get around to it today.

http://sohail.io/2014/09/20/xcode-6-and-running-uiautomation-test-from-the-command-line/

Instruments automation is rough world and thanks again.

@bwright2810
Copy link
Contributor Author

@NightShdwX I was able to run my scripts after that change, however I'm only using a real device. I've had problems using the simulator which, from your post, appear to be legitimate, but I haven't had a chance to look into it. Thanks for the link though, once I need to use the simulator it may come in handy.

alexvollmer added a commit that referenced this issue Sep 30, 2014
Fix for issue #74 - path change in Instruments 6.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants