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

Side by Side Diff: scripts/slave/ios/test_runner.py

Issue 2244053002: Add command to run earlgrey tests upstream. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Contains test runners for launching tests on simulators and devices.""" 6 """Contains test runners for launching tests on simulators and devices."""
7 7
8 # pylint: disable=relative-import 8 # pylint: disable=relative-import
9 import environment_setup 9 import environment_setup
10 10
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 1268
1269 Returns: 1269 Returns:
1270 A list whose elements are the args representing the command. 1270 A list whose elements are the args representing the command.
1271 """ 1271 """
1272 built_dir = os.path.split(self.app_path)[0] 1272 built_dir = os.path.split(self.app_path)[0]
1273 1273
1274 app_path = os.path.join(built_dir, self.test_host_name + '.app/') 1274 app_path = os.path.join(built_dir, self.test_host_name + '.app/')
1275 xctests_fullname = self.test_target_name + '.xctest' 1275 xctests_fullname = self.test_target_name + '.xctest'
1276 xctest_path = os.path.join(app_path, 'PlugIns', xctests_fullname) 1276 xctest_path = os.path.join(app_path, 'PlugIns', xctests_fullname)
1277 1277
1278 cmd = [ 1278 cmd=''
smut 2016/08/12 23:45:35 You don't need this initialization since you defin
1279 os.path.join(built_dir, 'iossim'), 1279 if self.xcode_version == '8.0':
1280 '-d', self.platform, 1280 cmd = [
1281 '-s', self.version, 1281 os.path.join(built_dir, 'iossim'),
1282 app_path, 1282 '-d', self.platform,
1283 xctest_path 1283 '-s', self.version,
1284 ] 1284 app_path,
1285 xctest_path
1286 ]
1287 else:
1288 cmd = [
1289 'xcodebuild', 'test-without-building',
1290 'BUILT_PRODUCTS_DIR=%s' % built_dir,
1291 '-project', self.test_project_dir,
1292 '-scheme','TestProject',
1293 '-destination','platform=iOS Simulator,name=%s,OS=%s'
1294 % (self.platform, self.version),
1295 '-archivePath', self.homedir,
1296 'APP_TARGET_NAME=%s' % self.test_host_name,
1297 'TEST_TARGET_NAME=%s' % self.test_target_name,
1298 'NSUnbufferedIO=YES'
1299 ]
1300
1285 return cmd 1301 return cmd
1286 1302
1287 @TestRunner.RequireTearDown 1303 @TestRunner.RequireTearDown
1288 def Launch(self, *args, **kwargs): 1304 def Launch(self, *args, **kwargs):
1289 """Launches the test.""" 1305 """Launches the test."""
1290 self.SetUp() 1306 self.SetUp()
1291 1307
1292 result = self._Run( 1308 result = self._Run(
1293 self.GetLaunchCommand(), self.GetLaunchEnvironment(), *args, **kwargs) 1309 self.GetLaunchCommand(), self.GetLaunchEnvironment(), *args, **kwargs)
1294 1310
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 ) 1480 )
1465 1481
1466 # Uninstall and re-install the app. 1482 # Uninstall and re-install the app.
1467 self.UninstallApp() 1483 self.UninstallApp()
1468 self.InstallApp() 1484 self.InstallApp()
1469 1485
1470 result = self._Run( 1486 result = self._Run(
1471 self.GetLaunchCommand(), self.GetLaunchEnvironment(), *args, **kwargs) 1487 self.GetLaunchCommand(), self.GetLaunchEnvironment(), *args, **kwargs)
1472 1488
1473 return self.RunAllTests(result, *args, **kwargs) 1489 return self.RunAllTests(result, *args, **kwargs)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698