bug 537147 (Talos orange: "Busted: tp4" "failed to initialize browser" with message about firefox being terminated) p=anodelman r=catlee

git-svn-id: svn://10.0.0.236/trunk@259502 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
anodelman%mozilla.com
2010-01-28 17:08:42 +00:00
parent bd4c4b9fa4
commit 8a76066007
3 changed files with 11 additions and 10 deletions

View File

@@ -121,7 +121,7 @@ class FFProcess(object):
def cleanupProcesses(self, process_name, child_process, browser_wait):
#kill any remaining browser processes
self.TerminateAllProcesses(browser_wait, process_name, "crashreporter", "dwwin", "talkback")
self.TerminateAllProcesses(browser_wait, process_name, child_process, "crashreporter", "dwwin", "talkback")
#check if anything is left behind
if self.checkAllProcesses(process_name, child_process):
#this is for windows machines. when attempting to send kill messages to win processes the OS

View File

@@ -142,7 +142,7 @@ class FFSetup(object):
else:
utils.debug("WARNING: file already installed (" + fromfile + ")")
def InitializeNewProfile(self, browser_path, process, browser_wait, extra_args, profile_dir, init_url, log):
def InitializeNewProfile(self, browser_path, process, child_process, browser_wait, extra_args, profile_dir, init_url, log):
"""Runs browser with the new profile directory, to negate any performance
hit that could occur as a result of starting up with a new profile.
Also kills the "extra" browser that gets spawned the first time browser
@@ -154,7 +154,7 @@ class FFSetup(object):
"""
PROFILE_REGEX = re.compile('__metrics(.*)__metrics', re.DOTALL|re.MULTILINE)
command_line = self.ffprocess.GenerateBrowserCommandLine(browser_path, extra_args, profile_dir, init_url)
process = subprocess.Popen('python bcontroller.py --command "%s" --name %s --timeout %d --log %s' % (command_line, process, browser_wait, log), universal_newlines=True, shell=True, bufsize=0, env=os.environ)
process = subprocess.Popen('python bcontroller.py --command "%s" --name %s --child_process %s --timeout %d --log %s' % (command_line, process, child_process, browser_wait, log), universal_newlines=True, shell=True, bufsize=0, env=os.environ)
res = 0
total_time = 0
while total_time < 600: #10 minutes

View File

@@ -109,6 +109,7 @@ class TTest(object):
def initializeProfile(self, profile_dir, browser_config):
if not (self._ffsetup.InitializeNewProfile(browser_config['browser_path'],
browser_config['process'],
browser_config['child_process'],
browser_config['browser_wait'],
browser_config['extra_args'],
profile_dir,
@@ -116,7 +117,7 @@ class TTest(object):
browser_config['browser_log'])):
raise talosError("failed to initialize browser")
time.sleep(browser_config['browser_wait'])
if self._ffprocess.checkAllProcesses(browser_config['process'], browser_config['process']):
if self._ffprocess.checkAllProcesses(browser_config['process'], browser_config['child_process']):
raise talosError("browser failed to close after being initialized")
def cleanupProfile(self, dir):
@@ -193,12 +194,12 @@ class TTest(object):
browser_config['dirs'][dir])
# make profile path work cross-platform
test_config['profile_path'] = os.path.normpath(test_config['profile_path'])
profile_dir, temp_dir = self.createProfile(test_config['profile_path'], browser_config)
if os.path.isfile(browser_config['browser_log']):
os.chmod(browser_config['browser_log'], 0777)
os.remove(browser_config['browser_log'])
self.initializeProfile(profile_dir, browser_config)
test_config['profile_path'] = os.path.normpath(test_config['profile_path'])
profile_dir, temp_dir = self.createProfile(test_config['profile_path'], browser_config)
if os.path.isfile(browser_config['browser_log']):
os.chmod(browser_config['browser_log'], 0777)
os.remove(browser_config['browser_log'])
self.initializeProfile(profile_dir, browser_config)
utils.debug("initialized " + browser_config['process'])
if test_config['shutdown']: