| OLD | NEW |
| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 cmd.extend([ | 400 cmd.extend([ |
| 401 '--test-host', test['app'], | 401 '--test-host', test['app'], |
| 402 '--dummyproj', self.package_repo_resource( | 402 '--dummyproj', self.package_repo_resource( |
| 403 'scripts', 'slave', 'ios', 'TestProject', 'TestProject.xcodeproj'), | 403 'scripts', 'slave', 'ios', 'TestProject', 'TestProject.xcodeproj'), |
| 404 ]) | 404 ]) |
| 405 | 405 |
| 406 step_name = test['app'] | 406 step_name = test['app'] |
| 407 | 407 |
| 408 if self.platform == 'simulator': | 408 if self.platform == 'simulator': |
| 409 cmd.extend([ | 409 cmd.extend([ |
| 410 '--iossim', self.m.path['slave_build'].join(self.most_recent_iossim), | 410 '--iossim', self.most_recent_iossim, |
| 411 '--platform', test['device type'], | 411 '--platform', test['device type'], |
| 412 '--version', test['os'], | 412 '--version', test['os'], |
| 413 ]) | 413 ]) |
| 414 | 414 |
| 415 # Since we may be running simulator tests on multiple platforms, | 415 # Since we may be running simulator tests on multiple platforms, |
| 416 # include the platform and OS in the name of the step. | 416 # include the platform and OS in the name of the step. |
| 417 step_name = '%s (%s iOS %s)' % ( | 417 step_name = '%s (%s iOS %s)' % ( |
| 418 test['app'], | 418 test['app'], |
| 419 test['device type'], | 419 test['device type'], |
| 420 test['os'], | 420 test['os'], |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 '--out-dir', '${ISOLATED_OUTDIR}', | 499 '--out-dir', '${ISOLATED_OUTDIR}', |
| 500 '--xcode-version', '<(xcode_version)', | 500 '--xcode-version', '<(xcode_version)', |
| 501 ] | 501 ] |
| 502 files = [ | 502 files = [ |
| 503 # .apps are directories. Need the trailing slash to isolate the | 503 # .apps are directories. Need the trailing slash to isolate the |
| 504 # contents of a directory. | 504 # contents of a directory. |
| 505 '<(app_path)/', | 505 '<(app_path)/', |
| 506 'src/ios/build/bots/scripts/', | 506 'src/ios/build/bots/scripts/', |
| 507 ] | 507 ] |
| 508 if self.platform == 'simulator': | 508 if self.platform == 'simulator': |
| 509 iossim = self.m.path.join(self.most_recent_iossim) | 509 iossim = self.most_recent_iossim |
| 510 cmd.extend([ | 510 cmd.extend([ |
| 511 '--iossim', iossim, | 511 '--iossim', iossim, |
| 512 '--platform', '<(platform)', | 512 '--platform', '<(platform)', |
| 513 '--version', '<(version)', | 513 '--version', '<(version)', |
| 514 ]) | 514 ]) |
| 515 files.append(iossim) | 515 files.append(iossim) |
| 516 isolate_template_contents = { | 516 isolate_template_contents = { |
| 517 'conditions': [ | 517 'conditions': [ |
| 518 ['OS == "ios"', { | 518 ['OS == "ios"', { |
| 519 'variables': { | 519 'variables': { |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 # out/Debug-iphonesimulator/iossim | 749 # out/Debug-iphonesimulator/iossim |
| 750 # out/Release-iphoneos/iossim | 750 # out/Release-iphoneos/iossim |
| 751 # out/Release-iphonesimulator/iossim | 751 # out/Release-iphonesimulator/iossim |
| 752 | 752 |
| 753 platform = { | 753 platform = { |
| 754 'device': 'iphoneos', | 754 'device': 'iphoneos', |
| 755 'simulator': 'iphonesimulator', | 755 'simulator': 'iphonesimulator', |
| 756 }[self.platform] | 756 }[self.platform] |
| 757 | 757 |
| 758 return { | 758 return { |
| 759 'xcodebuild': self.m.path.join( | 759 'xcodebuild': self.m.path['checkout'].join( |
| 760 'src', | |
| 761 build_dir, | 760 build_dir, |
| 762 self.configuration, | 761 self.configuration, |
| 763 'iossim', | 762 'iossim', |
| 764 ), | 763 ), |
| 765 'ninja': self.m.path.join( | 764 'ninja': self.m.path['checkout'].join( |
| 766 'src', | |
| 767 build_dir, | 765 build_dir, |
| 768 '%s-%s' % (self.configuration, platform), | 766 '%s-%s' % (self.configuration, platform), |
| 769 'iossim', | 767 'iossim', |
| 770 ), | 768 ), |
| 771 }[self.compiler] | 769 }[self.compiler] |
| OLD | NEW |