Skip to content

Commit

Permalink
Xcode 12.0 compatible change on device testing.
Browse files Browse the repository at this point in the history
Xcode 12.0 compatible change on device testing.
  • Loading branch information
albertdai committed Aug 4, 2020
1 parent 0809aad commit 81bf468
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions xctestrunner/test_runner/xctestrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,21 @@ def _GenerateTestRootForXctest(self):
os.path.basename(self._app_under_test_dir))[0]
platform_name = 'iPhoneOS' if self._on_device else 'iPhoneSimulator'
developer_path = '__PLATFORMS__/%s.platform/Developer' % platform_name
if xcode_info_util.GetXcodeVersionNumber() < 1000:
dyld_insert_libs = ('%s/Library/PrivateFrameworks/'
'IDEBundleInjection.framework/IDEBundleInjection' %
developer_path)

if self._on_device:
if xcode_info_util.GetXcodeVersionNumber() < 1000:
dyld_insert_libs = ('__TESTHOST__/Frameworks/'
'IDEBundleInjection.framework/IDEBundleInjection')
else:
dyld_insert_libs = '__TESTHOST__/Frameworks/libXCTestBundleInject.dylib'
else:
dyld_insert_libs = ('%s/usr/lib/libXCTestBundleInject.dylib' %
developer_path)
if xcode_info_util.GetXcodeVersionNumber() < 1000:
dyld_insert_libs = ('%s/Library/PrivateFrameworks/'
'IDEBundleInjection.framework/IDEBundleInjection' %
developer_path)
else:
dyld_insert_libs = ('%s/usr/lib/libXCTestBundleInject.dylib' %
developer_path)
test_envs = {
'XCInjectBundleInto': os.path.join('__TESTHOST__', app_under_test_name),
'DYLD_FRAMEWORK_PATH': '__TESTROOT__:{developer}/Library/Frameworks:'
Expand Down

0 comments on commit 81bf468

Please sign in to comment.