| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 def path_from_webkit_base(self, *comps): | 65 def path_from_webkit_base(self, *comps): |
| 66 return self._filesystem.join(self.webkit_base(), *comps) | 66 return self._filesystem.join(self.webkit_base(), *comps) |
| 67 | 67 |
| 68 def path_from_chromium_base(self, *comps): | 68 def path_from_chromium_base(self, *comps): |
| 69 return self._filesystem.join(self.chromium_base(), *comps) | 69 return self._filesystem.join(self.chromium_base(), *comps) |
| 70 | 70 |
| 71 def path_to_script(self, script_name): | 71 def path_to_script(self, script_name): |
| 72 """Returns the relative path to the script from the top of the WebKit tr
ee.""" | 72 """Returns the relative path to the script from the top of the WebKit tr
ee.""" |
| 73 # This is intentionally relative in order to force callers to consider w
hat | 73 # This is intentionally relative in order to force callers to consider w
hat |
| 74 # their current working directory is (and change to the top of the tree
if necessary). | 74 # their current working directory is (and change to the top of the tree
if necessary). |
| 75 return self._filesystem.join("tools", script_name) | 75 return self.path_from_chromium_base("sky", "tools", script_name) |
| 76 | 76 |
| 77 def layout_tests_dir(self): | 77 def layout_tests_dir(self): |
| 78 return self.path_from_webkit_base('tests') | 78 return self.path_from_webkit_base('tests') |
| 79 | 79 |
| 80 def perf_tests_dir(self): | 80 def perf_tests_dir(self): |
| 81 return self.path_from_webkit_base('PerformanceTests') | 81 return self.path_from_webkit_base('PerformanceTests') |
| 82 | 82 |
| 83 def depot_tools_base(self): | 83 def depot_tools_base(self): |
| 84 if not self._depot_tools: | 84 if not self._depot_tools: |
| 85 # This basically duplicates src/tools/find_depot_tools.py without th
e side effects | 85 # This basically duplicates src/tools/find_depot_tools.py without th
e side effects |
| (...skipping 14 matching lines...) Expand all Loading... |
| 100 prev_dir = '' | 100 prev_dir = '' |
| 101 current_dir = fs.dirname(self._webkit_base) | 101 current_dir = fs.dirname(self._webkit_base) |
| 102 while current_dir != prev_dir: | 102 while current_dir != prev_dir: |
| 103 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')): | 103 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')): |
| 104 return fs.join(current_dir, 'depot_tools') | 104 return fs.join(current_dir, 'depot_tools') |
| 105 prev_dir = current_dir | 105 prev_dir = current_dir |
| 106 current_dir = fs.dirname(current_dir) | 106 current_dir = fs.dirname(current_dir) |
| 107 | 107 |
| 108 def path_from_depot_tools_base(self, *comps): | 108 def path_from_depot_tools_base(self, *comps): |
| 109 return self._filesystem.join(self.depot_tools_base(), *comps) | 109 return self._filesystem.join(self.depot_tools_base(), *comps) |
| OLD | NEW |