summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 18:04:45 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 18:04:45 +0000
commitcea3dfdedf95788f9973bcce16fc9446e898af9e (patch)
tree958b582432ba5263a52c76327e863bd33703870c /chrome/test/ui
parent7ef219e01e9ebfb0bddc40d431acaa2cacd432f0 (diff)
downloadchromium_src-cea3dfdedf95788f9973bcce16fc9446e898af9e.zip
chromium_src-cea3dfdedf95788f9973bcce16fc9446e898af9e.tar.gz
chromium_src-cea3dfdedf95788f9973bcce16fc9446e898af9e.tar.bz2
When running ui_tests, need to tell valgrind to also trace child processes.
Also need to avoid valgrinding python. Review URL: http://codereview.chromium.org/45053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/ui_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 72d24b7..c4d4cbc 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -354,6 +354,18 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
!show_window_,
&process_);
#elif defined(OS_POSIX)
+ // Sometimes one needs to run the browser under a special environment
+ // (e.g. valgrind) without also running the test harness (e.g. python)
+ // under the special environment. Provide a way to wrap the browser
+ // commandline with a special prefix to invoke the special environment.
+ const char* browser_wrapper = getenv("BROWSER_WRAPPER");
+ if (browser_wrapper) {
+ CommandLine wrapped_command(ASCIIToWide(browser_wrapper));
+ wrapped_command.AppendArguments(command_line, true);
+ command_line = wrapped_command;
+ LOG(INFO) << "BROWSER_WRAPPER was set, prefixing command_line with " << browser_wrapper;
+ }
+
bool started = base::LaunchApp(command_line.argv(),
server_->fds_to_map(),
false, // Don't wait.