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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder.py

Issue 2442273003: Fix for rebaseline-cl --only-changed-tests: use hard-coded constant layout test dir. (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 | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py » ('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 (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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 def layout_tests_dir(self): 82 def layout_tests_dir(self):
83 return self.path_from_webkit_base('LayoutTests') 83 return self.path_from_webkit_base('LayoutTests')
84 84
85 def perf_tests_dir(self): 85 def perf_tests_dir(self):
86 return self.path_from_webkit_base('PerformanceTests') 86 return self.path_from_webkit_base('PerformanceTests')
87 87
88 def layout_test_name(self, file_path): 88 def layout_test_name(self, file_path):
89 """Returns a layout test name, given the path from the repo root. 89 """Returns a layout test name, given the path from the repo root.
90 90
91 Note: this appears to not work on Windows; see crbug.com/658795.
92 Also, this function duplicates functionality that's in
93 Port.relative_test_filename.
94 TODO(qyearsley): De-duplicate this and Port.relative_test_filename,
95 and ensure that it works properly with Windows paths.
96
91 Args: 97 Args:
92 file_path: A relative path from the root of the Chromium repo. 98 file_path: A relative path from the root of the Chromium repo.
93 99
94 Returns: 100 Returns:
95 The normalized layout test name, which is just the relative path fro m 101 The normalized layout test name, which is just the relative path fro m
96 the LayoutTests directory, using forward slash as the path separator . 102 the LayoutTests directory, using forward slash as the path separator .
97 Returns None if the given file is not in the LayoutTests directory. 103 Returns None if the given file is not in the LayoutTests directory.
98 """ 104 """
99 layout_tests_abs_path = self._filesystem.join(self.webkit_base(), self.l ayout_tests_dir()) 105 layout_tests_abs_path = self._filesystem.join(self.webkit_base(), self.l ayout_tests_dir())
100 layout_tests_rel_path = self._filesystem.relpath(layout_tests_abs_path, self.chromium_base()) 106 layout_tests_rel_path = self._filesystem.relpath(layout_tests_abs_path, self.chromium_base())
(...skipping 21 matching lines...) Expand all
122 prev_dir = '' 128 prev_dir = ''
123 current_dir = fs.dirname(self._webkit_base) 129 current_dir = fs.dirname(self._webkit_base)
124 while current_dir != prev_dir: 130 while current_dir != prev_dir:
125 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')): 131 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')):
126 return fs.join(current_dir, 'depot_tools') 132 return fs.join(current_dir, 'depot_tools')
127 prev_dir = current_dir 133 prev_dir = current_dir
128 current_dir = fs.dirname(current_dir) 134 current_dir = fs.dirname(current_dir)
129 135
130 def path_from_depot_tools_base(self, *comps): 136 def path_from_depot_tools_base(self, *comps):
131 return self._filesystem.join(self.depot_tools_base(), *comps) 137 return self._filesystem.join(self.depot_tools_base(), *comps)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698