Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: ios/build/bots/scripts/test_runner.py

Issue 2473103006: Rename XCTests test main target and output. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/build/bots/chromium.fyi/EarlGreyiOS.json ('k') | ios/build/tools/convert_gn_xcodeproj.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/build/bots/scripts/test_runner.py
diff --git a/ios/build/bots/scripts/test_runner.py b/ios/build/bots/scripts/test_runner.py
index e51e4e0855dcf59980e8f1a6f8b11eb70e06fab2..48f7661c08416d76c744da80c0ac1cd7ef63bc26 100644
--- a/ios/build/bots/scripts/test_runner.py
+++ b/ios/build/bots/scripts/test_runner.py
@@ -682,9 +682,18 @@ class DeviceTestRunner(TestRunner):
env = super(DeviceTestRunner, self).get_launch_env()
if self.xctest_path:
env['NSUnbufferedIO'] = 'YES'
- # e.g. ios_web_shell_test_host
- env['APP_TARGET_NAME'] = (
- os.path.splitext(os.path.basename(self.app_path))[0])
- # e.g. ios_web_shell_test
- env['TEST_TARGET_NAME'] = env['APP_TARGET_NAME'].rsplit('_', 1)[0]
+ # e.g. ios_web_shell_egtests
+ env['APP_TARGET_NAME'] = os.path.splitext(
+ os.path.basename(self.app_path))[0]
+
+ # Two convention for the test name have been in use. Old convention was to
+ # use the host name without _host suffix while the new convention is to
+ # use host name with _module suffix. As new convention does not use _host
+ # suffix its presence can be used to determine correct name for the test
+ # target. TODO(crbug.com/662404): remove once only new convention is used.
+ # e.g. ios_web_shell_egtests_module
+ if env['APP_TARGET_NAME'].endswith('_host'):
+ env['TEST_TARGET_NAME'] = env['APP_TARGET_NAME'].rsplit('_', 1)[0]
+ else:
+ env['TEST_TARGET_NAME'] = env['APP_TARGET_NAME'] + '_module'
return env
« no previous file with comments | « ios/build/bots/chromium.fyi/EarlGreyiOS.json ('k') | ios/build/tools/convert_gn_xcodeproj.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698