Created
January 25, 2013 04:14
-
-
Save sync/4631673 to your computer and use it in GitHub Desktop.
Teamcity ios-sim integration
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
if ENV['SL_RUN_UNIT_TESTS'] then | |
launcher_path = File.join(ENV['SRCROOT'], "../../bin", "ios-sim") | |
test_bundle_path= File.join(ENV['BUILT_PRODUCTS_DIR'], "#{ENV['PRODUCT_NAME']}.#{ENV['WRAPPER_EXTENSION']}") | |
environment = { | |
'DYLD_INSERT_LIBRARIES' => "/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection", | |
'XCInjectBundle' => test_bundle_path, | |
'XCInjectBundleInto' => ENV["TEST_HOST"] | |
} | |
environment_args = environment.collect { |key, value| "--setenv #{key}=\"#{value}\""}.join(" ") | |
app_test_host = File.dirname(ENV["TEST_HOST"]) | |
system("#{launcher_path} launch \"#{app_test_host}\" #{environment_args} --args -SenTest All #{test_bundle_path}") | |
else | |
puts "SL_RUN_UNIT_TESTS not set - Did not run unit tests!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment