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 |