summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib/pyauto.py
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 05:40:20 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 05:40:20 +0000
commit4777f90e913cec0e218f5c45eaf01cd388c9e6ed (patch)
tree3d0fcfe1cbb951cefc418deca60ff3cec7e61383 /chrome/test/pyautolib/pyauto.py
parenta3747d726e2b87af9ee3e68a44955a212b8bd256 (diff)
downloadchromium_src-4777f90e913cec0e218f5c45eaf01cd388c9e6ed.zip
chromium_src-4777f90e913cec0e218f5c45eaf01cd388c9e6ed.tar.gz
chromium_src-4777f90e913cec0e218f5c45eaf01cd388c9e6ed.tar.bz2
Enable crash reporting by default with PyAuto on Mac/Linux
It's already enabled on windows by default. This of course applies only to the branded builds. Also, make the path to imported pyauto binaries prettier by applying os.path.normpath Change to chrome_switches.cc is to put a comment at the place where it belongs Review URL: http://codereview.chromium.org/2873073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib/pyauto.py')
-rw-r--r--chrome/test/pyautolib/pyauto.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index c499efa..c57c411 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -60,7 +60,7 @@ def _LocateBinDirs():
os.pardir, os.pardir, 'third_party'),
script_dir,
]
- sys.path += bin_dirs.get(sys.platform, []) + deps_dirs
+ sys.path += map(os.path.normpath, bin_dirs.get(sys.platform, []) + deps_dirs)
_LocateBinDirs()
@@ -1305,7 +1305,7 @@ class Main(object):
else:
args = self._LoadTestNamesFrom(pyauto_tests_file)
args = args * self._options.repeat
- logging.debug("Loading tests from %s", args)
+ logging.debug("Loading %d tests from %s", len(args), args)
loaded_tests = unittest.defaultTestLoader.loadTestsFromNames(args)
return loaded_tests
@@ -1337,8 +1337,15 @@ class Main(object):
raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
suite_args = [sys.argv[0]]
- if self._options.chrome_flags:
- suite_args.append('--extra-chrome-flags=' + self._options.chrome_flags)
+ chrome_flags = self._options.chrome_flags
+ # Enable crash reporter by default on posix.
+ # On windows, the choice to enable/disable crash reporting is made when
+ # downloading the installer.
+ # TODO(nirnimesh): Figure out a way to control this from here on Win too.
+ if PyUITest.IsPosix():
+ chrome_flags += ' --enable-crash-reporter'
+ if chrome_flags:
+ suite_args.append('--extra-chrome-flags=%s' % chrome_flags)
pyauto_suite = PyUITestSuite(suite_args)
loaded_tests = self._LoadTests(self._args)
pyauto_suite.addTests(loaded_tests)