Merge mozilla-central to mozilla-inbound

This commit is contained in:
Ed Morley 2012-08-08 19:13:29 +01:00
commit 9d36b17111
8 changed files with 22 additions and 83 deletions

View File

@ -43,11 +43,16 @@ function test_loadTabs(restoreHiddenTabs, callback) {
ok(isRestoring < 4, "restoring max. 3 tabs concurrently");
}
if (win.gBrowser.tabs.length - needsRestore == expectedTabs) {
// We're explicity checking for (isRestoring == 1) here because the test
// progress listener is called before the session store one. So when we're
// called with one tab left to restore we know that the last tab has
// finished restoring and will soon be handled by the SS listener.
let tabsNeedingRestore = win.gBrowser.tabs.length - needsRestore;
if (isRestoring == 1 && tabsNeedingRestore == expectedTabs) {
is(win.gBrowser.visibleTabs.length, 4, "only 4 visible tabs");
TabsProgressListener.uninit();
callback();
executeSoon(callback);
}
});
}

View File

@ -110,6 +110,6 @@ load 715056.html
load 741163-1.html
load 766426.html
load 771639.html
asserts(0-1) load 752226-1.html
asserts(0-1) load 752226-2.html
load 752226-1.html
load 752226-2.html
HTTP(..) load xhr_abortinprogress.html

View File

@ -32,8 +32,7 @@ LOCAL_INCLUDES += \
DEFINES += -D_IMPL_NS_LAYOUT
# Bug 770046 - Cannot fail.
# MOCHITEST_FILES = test_ipc.html
MOCHITEST_FILES = test_ipc.html
# Need to enable these tests sometime soon.
#XPCSHELL_TESTS = unit

View File

@ -5,12 +5,11 @@
import sys
from setuptools import setup, find_packages
version = '0.2.40'
version = '0.3'
deps = ['pulsebuildmonitor >= 0.62', 'MozillaPulse == 0.61',
'mozinfo == 0.3.1', 'mozprofile == 0.1t',
'mozprocess == 0.1a', 'mozrunner == 3.0a', 'mozregression == 0.3',
'mozautolog >= 0.2.1', 'mozautoeslib == 0.1.1']
deps = ['mozinfo == 0.3.3', 'mozprofile == 0.4',
'mozprocess == 0.4', 'mozrunner == 5.8', 'mozregression == 0.6.3',
'mozautolog == 0.2.4', 'mozautoeslib == 0.1.1']
# we only support python 2.6+ right now
assert sys.version_info[0] == 2
@ -27,9 +26,6 @@ setup(name='tps',
author_email='jgriffin@mozilla.com',
url='http://hg.mozilla.org/services/services-central',
license='MPL',
dependency_links = [
"http://people.mozilla.org/~jgriffin/packages/"
],
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,

View File

@ -3,7 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from firefoxrunner import TPSFirefoxRunner
from pulse import TPSPulseMonitor
from testrunner import TPSTestRunner
from mozhttpd import MozHttpd

View File

@ -12,7 +12,7 @@ import traceback
from threading import RLock
from tps import TPSFirefoxRunner, TPSPulseMonitor, TPSTestRunner
from tps import TPSFirefoxRunner, TPSTestRunner
def main():
parser = optparse.OptionParser()

View File

@ -1,66 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
import logging
import socket
from pulsebuildmonitor import PulseBuildMonitor
from tps.thread import TPSTestThread
class TPSPulseMonitor(PulseBuildMonitor):
"""Listens to pulse messages, and initiates a TPS test run when
a relevant 'build complete' message is received.
"""
def __init__(self, extensionDir, platform='linux', config=None,
autolog=False, emailresults=False, testfile=None,
logfile=None, rlock=None, **kwargs):
self.buildtype = ['opt']
self.autolog = autolog
self.emailresults = emailresults
self.testfile = testfile
self.logfile = logfile
self.rlock = rlock
self.extensionDir = extensionDir
self.config = config
self.tree = self.config.get('tree', ['services-central'])
self.platform = [self.config.get('platform', 'linux')]
self.label=('crossweave@mozilla.com|tps_build_monitor_' +
socket.gethostname())
self.logger = logging.getLogger('tps_pulse')
self.logger.setLevel(logging.DEBUG)
handler = logging.FileHandler('tps_pulse.log')
self.logger.addHandler(handler)
PulseBuildMonitor.__init__(self,
trees=self.tree,
label=self.label,
logger=self.logger,
platforms=self.platform,
buildtypes=self.buildtype,
builds=True,
**kwargs)
def onPulseMessage(self, data):
key = data['_meta']['routing_key']
#print key
def onBuildComplete(self, builddata):
print "================================================================="
print json.dumps(builddata)
print "================================================================="
thread = TPSTestThread(self.extensionDir,
builddata=builddata,
emailresults=self.emailresults,
autolog=self.autolog,
testfile=self.testfile,
logfile=self.logfile,
rlock=self.rlock,
config=self.config)
thread.daemon = True
thread.start()

View File

@ -6302,7 +6302,13 @@ DirectoryInstallLocation.prototype = {
let newEntry = this._readDirectoryFromFile(entry);
if (!newEntry) {
LOG("Deleting stale pointer file " + entry.path);
entry.remove(true);
try {
entry.remove(true);
}
catch (e) {
WARN("Failed to remove stale pointer file " + entry.path, e);
// Failing to remove the stale pointer file is ignorable
}
continue;
}