Skip to content

Commit

Permalink
Create .xctestrun file instead of .plist
Browse files Browse the repository at this point in the history
  • Loading branch information
aircraft-cerier authored and tirodkar committed Aug 23, 2023
1 parent 4c5709d commit b7698df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion xctestrunner/test_runner/xctest_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def SetLaunchOptions(self, launch_options):
if launch_options.get('uitest_auto_screenshots'):
self._disable_uitest_auto_screenshots = False
# By default, this SystemAttachmentLifetime field is in the generated
# xctestrun.plist.
# test.xctestrun.
try:
self._xctestrun_obj.DeleteXctestrunField('SystemAttachmentLifetime')
except ios_errors.PlistError:
Expand Down
16 changes: 8 additions & 8 deletions xctestrunner/test_runner/xctestrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def GenerateXctestrun(self):
return self._xctestrun_obj
if self._work_dir:
self._test_root_dir = os.path.join(self._work_dir, 'TEST_ROOT')
xctestrun_file_path = os.path.join(self._test_root_dir, 'xctestrun.plist')
xctestrun_file_path = os.path.join(self._test_root_dir, 'test.xctestrun')
if os.path.exists(xctestrun_file_path):
logging.info('Skips generating xctestrun file which is generated.')
self._xctestrun_obj = XctestRun(xctestrun_file_path)
Expand Down Expand Up @@ -370,7 +370,7 @@ def GenerateXctestrun(self):
elif self._test_type == ios_constants.TestType.LOGIC_TEST:
self._GenerateTestRootForLogicTest()

xctestrun_file_path = os.path.join(self._test_root_dir, 'xctestrun.plist')
xctestrun_file_path = os.path.join(self._test_root_dir, 'test.xctestrun')
plist_util.Plist(xctestrun_file_path).SetPlistField('Runner',
self._xctestrun_dict)

Expand Down Expand Up @@ -418,8 +418,8 @@ def _ValidateArguments(self):
def _GenerateTestRootForXcuitest(self):
"""Generates the test root for XCUITest.
The approach constructs xctestrun.plist and uitest runner app from Xcode.
Then copies app under test, test bundle, xctestrun.plist and uitest
The approach constructs test.xctestrun and uitest runner app from Xcode.
Then copies app under test, test bundle, test.xctestrun and uitest
runner app to test root directory.
"""
platform_path = xcode_info_util.GetSdkPlatformPath(self._sdk)
Expand Down Expand Up @@ -605,8 +605,8 @@ def _PrepareUitestInRunerApp(self, uitest_runner_app):
def _GenerateTestRootForXctest(self):
"""Generates the test root for XCTest.
The approach constructs xctestrun.plist from Xcode. Then copies app under
test, test bundle and xctestrun.plist to test root directory.
The approach constructs test.xctestrun from Xcode. Then copies app under
test, test bundle and test.xctestrun to test root directory.
"""
app_under_test_plugins_dir = os.path.join(
self._app_under_test_dir, 'PlugIns')
Expand Down Expand Up @@ -705,8 +705,8 @@ def _GenerateTestRootForXctest(self):
def _GenerateTestRootForLogicTest(self):
"""Generates the test root for Logic test.
The approach constructs xctestrun.plist from Xcode. Then copies test bundle
and xctestrun.plist to test root directory.
The approach constructs test.xctestrun from Xcode. Then copies test bundle
and test.xctestrun to test root directory.
"""
dyld_framework_path = os.path.join(
xcode_info_util.GetSdkPlatformPath(self._sdk),
Expand Down

0 comments on commit b7698df

Please sign in to comment.