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

Side by Side Diff: scripts/slave/recipe_modules/ios/api.py

Issue 2446843002: Reland "Support xctests" (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/ios/example.expected/basic.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import copy 5 import copy
6 6
7 from recipe_engine import recipe_api 7 from recipe_engine import recipe_api
8 8
9 9
10 class iOSApi(recipe_api.RecipeApi): 10 class iOSApi(recipe_api.RecipeApi):
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 self.test = copy.deepcopy(test) 474 self.test = copy.deepcopy(test)
475 self.tmp_dir = None 475 self.tmp_dir = None
476 476
477 tasks = [] 477 tasks = []
478 failures = [] 478 failures = []
479 skipped = [] 479 skipped = []
480 480
481 cmd = [ 481 cmd = [
482 'src/ios/build/bots/scripts/run.py', 482 'src/ios/build/bots/scripts/run.py',
483 '--app', '<(app_path)', 483 '--app', '<(app_path)',
484 '--args-json', '{"xctest": <(xctest)}',
484 '--out-dir', '${ISOLATED_OUTDIR}', 485 '--out-dir', '${ISOLATED_OUTDIR}',
485 '--xcode-version', '<(xcode_version)', 486 '--xcode-version', '<(xcode_version)',
486 ] 487 ]
487 files = [ 488 files = [
488 # .apps are directories. Need the trailing slash to isolate the 489 # .apps are directories. Need the trailing slash to isolate the
489 # contents of a directory. 490 # contents of a directory.
490 '<(app_path)/', 491 '<(app_path)/',
491 'src/ios/build/bots/scripts/', 492 'src/ios/build/bots/scripts/',
492 ] 493 ]
493 if self.platform == 'simulator': 494 if self.platform == 'simulator':
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 '%s.app' % test['app'], 538 '%s.app' % test['app'],
538 ) 539 )
539 isolate_gen_file = tmp_dir.join('%s.isolate.gen.json' % test['id']) 540 isolate_gen_file = tmp_dir.join('%s.isolate.gen.json' % test['id'])
540 541
541 try: 542 try:
542 args = [ 543 args = [
543 '--config-variable', 'OS', 'ios', 544 '--config-variable', 'OS', 'ios',
544 '--config-variable', 'app_path', app_path, 545 '--config-variable', 'app_path', app_path,
545 '--config-variable', 'xcode_version', test.get( 546 '--config-variable', 'xcode_version', test.get(
546 'xcode version', self.__config['xcode version']), 547 'xcode version', self.__config['xcode version']),
548 '--config-variable', 'xctest', (
549 'true' if test.get('xctest') else 'false'),
547 '--isolate', isolate_template, 550 '--isolate', isolate_template,
548 '--isolated', tmp_dir.join('%s.isolated' % test['id']), 551 '--isolated', tmp_dir.join('%s.isolated' % test['id']),
549 '--path-variable', 'app_path', app_path, 552 '--path-variable', 'app_path', app_path,
550 ] 553 ]
551 if self.platform == 'simulator': 554 if self.platform == 'simulator':
552 args.extend([ 555 args.extend([
553 '--config-variable', 'platform', test['device type'], 556 '--config-variable', 'platform', test['device type'],
554 '--config-variable', 'version', test['os'], 557 '--config-variable', 'version', test['os'],
555 ]) 558 ])
556 isolate_gen_file_contents = self.m.json.dumps({ 559 isolate_gen_file_contents = self.m.json.dumps({
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 @property 814 @property
812 def most_recent_iossim(self): 815 def most_recent_iossim(self):
813 """Returns the path to the most recently compiled iossim.""" 816 """Returns the path to the most recently compiled iossim."""
814 platform = { 817 platform = {
815 'device': 'iphoneos', 818 'device': 'iphoneos',
816 'simulator': 'iphonesimulator', 819 'simulator': 'iphonesimulator',
817 }[self.platform] 820 }[self.platform]
818 821
819 return self.m.path.join( 822 return self.m.path.join(
820 'src', 'out', '%s-%s' % (self.configuration, platform), 'iossim') 823 'src', 'out', '%s-%s' % (self.configuration, platform), 'iossim')
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/ios/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698