Chromium Code Reviews| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 *args: Any additional arguments to pass to the test harness. | 383 *args: Any additional arguments to pass to the test harness. |
| 384 """ | 384 """ |
| 385 assert self.__config is not None | 385 assert self.__config is not None |
| 386 test_failures = [] | 386 test_failures = [] |
| 387 infrastructure_failures = [] | 387 infrastructure_failures = [] |
| 388 | 388 |
| 389 for test in self.__config['tests']: | 389 for test in self.__config['tests']: |
| 390 cmd = [ | 390 cmd = [ |
| 391 self.package_repo_resource( | 391 self.package_repo_resource( |
| 392 'scripts', 'slave', 'ios', 'run.py'), | 392 'scripts', 'slave', 'ios', 'run.py'), |
| 393 '--app', self.m.path['slave_build'].join( | 393 '--app', self.m.path.join( |
|
Sergiy Byelozyorov
2016/08/08 14:32:49
nit: please fix whitespace before '--app'
Paweł Hajdan Jr.
2016/08/08 14:40:30
It's already aligned. Discussed over IM.
Sergiy Byelozyorov
2016/08/08 14:40:47
my bad... this is actually correct spacing, please
Sergiy Byelozyorov
2016/08/08 14:41:44
this is just imho, so up to you
| |
| 394 self.most_recent_app_dir, | 394 self.most_recent_app_dir, |
| 395 '%s.app' % test['app'], | 395 '%s.app' % test['app'], |
| 396 ), | 396 ), |
| 397 '--json_file', self.m.json.output(), | 397 '--json_file', self.m.json.output(), |
| 398 ] | 398 ] |
| 399 if test.get('xctest'): | 399 if test.get('xctest'): |
| 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'), |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 717 build_dir = { | 717 build_dir = { |
| 718 'xcodebuild': 'xcodebuild', | 718 'xcodebuild': 'xcodebuild', |
| 719 'ninja': 'out', | 719 'ninja': 'out', |
| 720 }[self.compiler] | 720 }[self.compiler] |
| 721 | 721 |
| 722 platform = { | 722 platform = { |
| 723 'device': 'iphoneos', | 723 'device': 'iphoneos', |
| 724 'simulator': 'iphonesimulator', | 724 'simulator': 'iphonesimulator', |
| 725 }[self.platform] | 725 }[self.platform] |
| 726 | 726 |
| 727 return self.m.path.join( | 727 return self.m.path['checkout'].join( |
| 728 'src', | |
| 729 build_dir, | 728 build_dir, |
| 730 '%s-%s' % (self.configuration, platform), | 729 '%s-%s' % (self.configuration, platform), |
| 731 ) | 730 ) |
| 732 | 731 |
| 733 @property | 732 @property |
| 734 def most_recent_iossim(self): | 733 def most_recent_iossim(self): |
| 735 """Returns the path to the most recently compiled iossim.""" | 734 """Returns the path to the most recently compiled iossim.""" |
| 736 build_dir = { | 735 build_dir = { |
| 737 'xcodebuild': self.m.path.join('xcodebuild', 'ninja-iossim'), | 736 'xcodebuild': self.m.path.join('xcodebuild', 'ninja-iossim'), |
| 738 'ninja': 'out', | 737 'ninja': 'out', |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 763 self.configuration, | 762 self.configuration, |
| 764 'iossim', | 763 'iossim', |
| 765 ), | 764 ), |
| 766 'ninja': self.m.path.join( | 765 'ninja': self.m.path.join( |
| 767 'src', | 766 'src', |
| 768 build_dir, | 767 build_dir, |
| 769 '%s-%s' % (self.configuration, platform), | 768 '%s-%s' % (self.configuration, platform), |
| 770 'iossim', | 769 'iossim', |
| 771 ), | 770 ), |
| 772 }[self.compiler] | 771 }[self.compiler] |
| OLD | NEW |