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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py

Issue 2648783004: Move exportable_commits_since to webkitpy/w3c/common.py. (Closed)
Patch Set: Created 3 years, 11 months 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 """A utility class for interacting with a local checkout of the Web Platform Tes ts.""" 5 """A utility class for interacting with a local checkout of the Web Platform Tes ts."""
6 6
7 import logging 7 import logging
8 8
9 from webkitpy.common.system.executive import ScriptError 9 from webkitpy.common.system.executive import ScriptError
10 from webkitpy.w3c.chromium_commit import ChromiumCommit 10 from webkitpy.w3c.chromium_commit import ChromiumCommit
11 from webkitpy.w3c.common import WPT_REPO_URL, CHROMIUM_WPT_DIR
11 12
12 WPT_REPO_URL = 'https://chromium.googlesource.com/external/w3c/web-platform-test s.git' 13
13 WPT_TEMP_DIR = '/tmp/wpt'
14 WPT_SSH_URL = 'git@github.com:w3c/web-platform-tests.git' 14 WPT_SSH_URL = 'git@github.com:w3c/web-platform-tests.git'
15 REMOTE_NAME = 'github' 15 REMOTE_NAME = 'github'
16 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/external/wpt/'
17 16
18 _log = logging.getLogger(__name__) 17 _log = logging.getLogger(__name__)
19 18
20 19
21 class LocalWPT(object): 20 class LocalWPT(object):
22 21
23 def __init__(self, host, path=WPT_TEMP_DIR): 22 def __init__(self, host, path='/tmp/wpt'):
24 """ 23 """
25 Args: 24 Args:
26 host: A Host object. 25 host: A Host object.
27 path: Optional, the path to the web-platform-tests repo. 26 path: Optional, the path to the web-platform-tests repo.
28 If this directory already exists, it is assumed that the 27 If this directory already exists, it is assumed that the
29 web-platform-tests repo is already checked out at this path. 28 web-platform-tests repo is already checked out at this path.
30 """ 29 """
31 self.host = host 30 self.host = host
32 self.path = path 31 self.path = path
33 self.branch_name = 'chromium-export-try' 32 self.branch_name = 'chromium-export-try'
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 127
129 def commits_behind_master(self, commit): 128 def commits_behind_master(self, commit):
130 """Returns the number of commits after the given commit on origin/master . 129 """Returns the number of commits after the given commit on origin/master .
131 130
132 This doesn't include the given commit, and this assumes that the given 131 This doesn't include the given commit, and this assumes that the given
133 commit is on the the master branch. 132 commit is on the the master branch.
134 """ 133 """
135 return len(self.run([ 134 return len(self.run([
136 'git', 'rev-list', '{}..origin/master'.format(commit) 135 'git', 'rev-list', '{}..origin/master'.format(commit)
137 ]).splitlines()) 136 ]).splitlines())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698