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

Side by Side Diff: chrome/test/pyautolib/pyauto_paths.py

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/pyautolib/pyauto_errors.py ('k') | chrome/test/pyautolib/pyauto_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Common paths for pyauto tests."""
6
7 import os
8 import sys
9
10
11 def GetSourceDir():
12 """Returns src/ directory."""
13 script_dir = os.path.abspath(os.path.dirname(__file__))
14 return os.path.join(script_dir, os.pardir, os.pardir, os.pardir)
15
16
17 def GetThirdPartyDir():
18 """Returns src/third_party directory."""
19 return os.path.join(GetSourceDir(), 'third_party')
20
21
22 def GetBuildDirs():
23 """Returns list of possible build directories."""
24 # List of dirs that can contain a Debug/Release build.
25 outer_dirs = {
26 'linux2': ['out'],
27 'linux3': ['out'],
28 'darwin': ['out', 'xcodebuild'],
29 'win32': ['chrome', 'build', 'out'],
30 'cygwin': ['chrome'],
31 }.get(sys.platform, [])
32 src_dir = GetSourceDir()
33 build_dirs = []
34 for dir in outer_dirs:
35 build_dirs += [os.path.join(src_dir, dir, 'Debug')]
36 build_dirs += [os.path.join(src_dir, dir, 'Release')]
37 return build_dirs
38
39
40 def GetChromeDriverExe():
41 """Returns path to ChromeDriver executable, or None if cannot be found."""
42 exe_name = 'chromedriver'
43 if sys.platform == 'win32':
44 exe_name += '.exe'
45
46 import pyautolib
47 dir = os.path.dirname(pyautolib.__file__)
48 exe = os.path.join(dir, exe_name)
49 if os.path.exists(exe):
50 return exe
51 return None
OLDNEW
« no previous file with comments | « chrome/test/pyautolib/pyauto_errors.py ('k') | chrome/test/pyautolib/pyauto_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698