Backed out 2 changesets (bug 1460914)for multiple failures on profile_data/base "CLOSED TREE"
Backed out changeset a2161aab4e4e (bug 1460914) Backed out changeset 9e438c55a248 (bug 1460914)
This commit is contained in:
@@ -539,12 +539,6 @@ ARCHIVE_FILES = {
|
|||||||
'pattern': 'automation.py',
|
'pattern': 'automation.py',
|
||||||
'dest': 'xpcshell',
|
'dest': 'xpcshell',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'source': buildconfig.topsrcdir,
|
|
||||||
'base': 'testing/profiles',
|
|
||||||
'pattern': '**',
|
|
||||||
'dest': 'xpcshell/profile_data',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
'updater-dep': [
|
'updater-dep': [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -121,9 +121,6 @@ class BaseProfile(object):
|
|||||||
self.set_preferences(prefs, filename=basename)
|
self.set_preferences(prefs, filename=basename)
|
||||||
|
|
||||||
extension_dir = os.path.join(other, 'extensions')
|
extension_dir = os.path.join(other, 'extensions')
|
||||||
if not os.path.isdir(extension_dir):
|
|
||||||
return
|
|
||||||
|
|
||||||
for basename in os.listdir(extension_dir):
|
for basename in os.listdir(extension_dir):
|
||||||
path = os.path.join(extension_dir, basename)
|
path = os.path.join(extension_dir, basename)
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
Dropping extensions here will get them installed in all test harnesses
|
|
||||||
that make use of this profile.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
// Empty base preferences file used by everything.
|
|
||||||
// This is useful for testing a pref on try.
|
|
||||||
/* globals user_pref */
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Common preferences file used by both unittest and perf harnesses.
|
// Base preferences file used by both unittest and perf harnesses.
|
||||||
/* globals user_pref */
|
/* globals user_pref */
|
||||||
user_pref("app.update.disabledForTesting", true);
|
user_pref("app.update.disabledForTesting", true);
|
||||||
user_pref("browser.chrome.guess_favicon", false);
|
user_pref("browser.chrome.guess_favicon", false);
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"mochitest": ["base", "common", "unittest"],
|
"mochitest": ["common", "unittest"],
|
||||||
"profileserver": ["base", "common", "unittest", "profileserver"],
|
"profileserver": ["common", "unittest", "profileserver"],
|
||||||
"raptor": ["base", "common", "perf", "raptor"],
|
"raptor": ["common", "perf", "raptor"],
|
||||||
"reftest": ["base", "common", "reftest"],
|
"reftest": ["common", "reftest"],
|
||||||
"talos": ["base", "common", "perf"],
|
"talos": ["common", "perf"],
|
||||||
"valgrind": ["base", "common", "unittest"],
|
"valgrind": ["common", "unittest"],
|
||||||
"xpcshell": ["base", "xpcshell"],
|
"web-platform-tests": ["common", "unittest", "web-platform"]
|
||||||
"web-platform-tests": ["base", "common", "unittest", "web-platform"]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
// Base preferences file used by the xpcshell harness
|
|
||||||
/* globals user_pref */
|
|
||||||
/* eslint quotes: 0 */
|
|
||||||
user_pref("app.normandy.api_url", "https://%(server)s/selfsupport-dummy/");
|
|
||||||
user_pref("browser.safebrowsing.downloads.remote.url", "https://%(server)s/safebrowsing-dummy");
|
|
||||||
user_pref("browser.search.geoip.url", "https://%(server)s/geoip-dummy");
|
|
||||||
user_pref("extensions.systemAddon.update.url", "http://%(server)s/dummy-system-addons.xml");
|
|
||||||
// Always use network provider for geolocation tests
|
|
||||||
// so we bypass the OSX dialog raised by the corelocation provider
|
|
||||||
user_pref("geo.provider.testing", true);
|
|
||||||
// Bug 1500975 - this is not being applied properly (it should be a bool)
|
|
||||||
user_pref("media.gmp-manager.updateEnabled", 'false');
|
|
||||||
user_pref("media.gmp-manager.url.override", "http://%(server)s/dummy-gmp-manager.xml");
|
|
||||||
user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy");
|
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
|
|
||||||
/* defined by the harness */
|
/* defined by the harness */
|
||||||
/* globals _HEAD_FILES, _HEAD_JS_PATH, _JSDEBUGGER_PORT, _JSCOV_DIR,
|
/* globals _HEAD_FILES, _HEAD_JS_PATH, _JSDEBUGGER_PORT, _JSCOV_DIR,
|
||||||
_MOZINFO_JS_PATH, _TEST_FILE, _TEST_NAME, _TESTING_MODULES_DIR:true,
|
_MOZINFO_JS_PATH, _TEST_FILE, _TEST_NAME, _TESTING_MODULES_DIR:true */
|
||||||
_PREFS_FILE */
|
|
||||||
|
|
||||||
/* defined by XPCShellImpl.cpp */
|
/* defined by XPCShellImpl.cpp */
|
||||||
/* globals load, sendCommand */
|
/* globals load, sendCommand */
|
||||||
@@ -1480,10 +1479,18 @@ function run_next_test() {
|
|||||||
try {
|
try {
|
||||||
// Set global preferences
|
// Set global preferences
|
||||||
if (runningInParent) {
|
if (runningInParent) {
|
||||||
let prefsFile = Cc["@mozilla.org/file/local;1"]
|
// Always use network provider for geolocation tests
|
||||||
.createInstance(Ci.nsIFile);
|
// so we bypass the OSX dialog raised by the corelocation provider
|
||||||
prefsFile.initWithPath(_PREFS_FILE);
|
_Services.prefs.setBoolPref("geo.provider.testing", true);
|
||||||
_Services.prefs.readUserPrefsFromFile(prefsFile);
|
|
||||||
|
// We need to avoid hitting the network with certain components.
|
||||||
|
_Services.prefs.setCharPref("media.gmp-manager.url.override", "http://%(server)s/dummy-gmp-manager.xml");
|
||||||
|
_Services.prefs.setCharPref("media.gmp-manager.updateEnabled", false);
|
||||||
|
_Services.prefs.setCharPref("extensions.systemAddon.update.url", "http://%(server)s/dummy-system-addons.xml");
|
||||||
|
_Services.prefs.setCharPref("app.normandy.api_url", "https://%(server)s/selfsupport-dummy/");
|
||||||
|
_Services.prefs.setCharPref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy");
|
||||||
|
_Services.prefs.setCharPref("browser.search.geoip.url", "https://%(server)s/geoip-dummy");
|
||||||
|
_Services.prefs.setCharPref("browser.safebrowsing.downloads.remote.url", "https://%(server)s/safebrowsing-dummy");
|
||||||
|
|
||||||
// Make tests run consistently on DevEdition (which has a lightweight theme
|
// Make tests run consistently on DevEdition (which has a lightweight theme
|
||||||
// selected by default).
|
// selected by default).
|
||||||
|
|||||||
@@ -348,15 +348,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
|||||||
self.device.chmod(remoteWrapper, root=True)
|
self.device.chmod(remoteWrapper, root=True)
|
||||||
os.remove(localWrapper)
|
os.remove(localWrapper)
|
||||||
|
|
||||||
def buildPrefsFile(self):
|
|
||||||
super(XPCShellRemote, self).buildPrefsFile()
|
|
||||||
|
|
||||||
remotePrefsFile = posixpath.join(self.remoteTestRoot, 'user.js')
|
|
||||||
self.device.push(self.prefsFile, remotePrefsFile)
|
|
||||||
self.device.chmod(remotePrefsFile, root=True)
|
|
||||||
os.remove(self.prefsFile)
|
|
||||||
self.prefsFile = remotePrefsFile
|
|
||||||
|
|
||||||
def buildEnvironment(self):
|
def buildEnvironment(self):
|
||||||
self.buildCoreEnvironment()
|
self.buildCoreEnvironment()
|
||||||
self.setLD_LIBRARY_PATH()
|
self.setLD_LIBRARY_PATH()
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ from mozlog import commandline
|
|||||||
import mozcrash
|
import mozcrash
|
||||||
import mozfile
|
import mozfile
|
||||||
import mozinfo
|
import mozinfo
|
||||||
from mozprofile import Profile
|
|
||||||
from mozrunner.utils import get_stack_fixer_function
|
from mozrunner.utils import get_stack_fixer_function
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
@@ -157,7 +156,6 @@ class XPCShellTestThread(Thread):
|
|||||||
self.log = kwargs.get('log')
|
self.log = kwargs.get('log')
|
||||||
self.app_dir_key = kwargs.get('app_dir_key')
|
self.app_dir_key = kwargs.get('app_dir_key')
|
||||||
self.interactive = kwargs.get('interactive')
|
self.interactive = kwargs.get('interactive')
|
||||||
self.prefsFile = kwargs.get('prefsFile')
|
|
||||||
|
|
||||||
# only one of these will be set to 1. adding them to the totals in
|
# only one of these will be set to 1. adding them to the totals in
|
||||||
# the harness
|
# the harness
|
||||||
@@ -404,6 +402,7 @@ class XPCShellTestThread(Thread):
|
|||||||
dbgport = 0 if self.jsDebuggerInfo is None else self.jsDebuggerInfo.port
|
dbgport = 0 if self.jsDebuggerInfo is None else self.jsDebuggerInfo.port
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'-e', 'const _SERVER_ADDR = "localhost"',
|
||||||
'-e', 'const _HEAD_FILES = [%s];' % cmdH,
|
'-e', 'const _HEAD_FILES = [%s];' % cmdH,
|
||||||
'-e', 'const _JSDEBUGGER_PORT = %d;' % dbgport,
|
'-e', 'const _JSDEBUGGER_PORT = %d;' % dbgport,
|
||||||
]
|
]
|
||||||
@@ -449,7 +448,6 @@ class XPCShellTestThread(Thread):
|
|||||||
'-s',
|
'-s',
|
||||||
'-e', 'const _HEAD_JS_PATH = "%s";' % self.headJSPath,
|
'-e', 'const _HEAD_JS_PATH = "%s";' % self.headJSPath,
|
||||||
'-e', 'const _MOZINFO_JS_PATH = "%s";' % self.mozInfoJSPath,
|
'-e', 'const _MOZINFO_JS_PATH = "%s";' % self.mozInfoJSPath,
|
||||||
'-e', 'const _PREFS_FILE = "%s";' % self.prefsFile.replace('\\', '\\\\'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if self.testingModulesDir:
|
if self.testingModulesDir:
|
||||||
@@ -946,33 +944,6 @@ class XPCShellTests(object):
|
|||||||
if self.mozInfo is None:
|
if self.mozInfo is None:
|
||||||
self.mozInfo = os.path.join(self.testharnessdir, "mozinfo.json")
|
self.mozInfo = os.path.join(self.testharnessdir, "mozinfo.json")
|
||||||
|
|
||||||
def buildPrefsFile(self):
|
|
||||||
# Create the prefs.js file
|
|
||||||
profile_data_dir = os.path.join(SCRIPT_DIR, 'profile_data')
|
|
||||||
|
|
||||||
# If possible, read profile data from topsrcdir. This prevents us from
|
|
||||||
# requiring a re-build to pick up newly added extensions in the
|
|
||||||
# <profile>/extensions directory.
|
|
||||||
if build:
|
|
||||||
path = os.path.join(build.topsrcdir, 'testing', 'profiles')
|
|
||||||
if os.path.isdir(path):
|
|
||||||
profile_data_dir = path
|
|
||||||
|
|
||||||
with open(os.path.join(profile_data_dir, 'profiles.json'), 'r') as fh:
|
|
||||||
base_profiles = json.load(fh)['xpcshell']
|
|
||||||
|
|
||||||
# values to use when interpolating preferences
|
|
||||||
interpolation = {
|
|
||||||
"server": "dummyserver",
|
|
||||||
}
|
|
||||||
|
|
||||||
profile = Profile(profile=self.tempDir, restore=False)
|
|
||||||
for name in base_profiles:
|
|
||||||
path = os.path.join(profile_data_dir, name)
|
|
||||||
profile.merge(path, interpolation=interpolation)
|
|
||||||
|
|
||||||
self.prefsFile = os.path.join(profile.profile, 'user.js')
|
|
||||||
|
|
||||||
def buildCoreEnvironment(self):
|
def buildCoreEnvironment(self):
|
||||||
"""
|
"""
|
||||||
Add environment variables likely to be used across all platforms, including
|
Add environment variables likely to be used across all platforms, including
|
||||||
@@ -1275,7 +1246,6 @@ class XPCShellTests(object):
|
|||||||
self.todoCount = 0
|
self.todoCount = 0
|
||||||
|
|
||||||
self.setAbsPath()
|
self.setAbsPath()
|
||||||
self.buildPrefsFile()
|
|
||||||
self.buildXpcsRunArgs()
|
self.buildXpcsRunArgs()
|
||||||
|
|
||||||
self.event = Event()
|
self.event = Event()
|
||||||
@@ -1346,8 +1316,7 @@ class XPCShellTests(object):
|
|||||||
'keep_going': self.keepGoing,
|
'keep_going': self.keepGoing,
|
||||||
'log': self.log,
|
'log': self.log,
|
||||||
'interactive': self.interactive,
|
'interactive': self.interactive,
|
||||||
'app_dir_key': appDirKey,
|
'app_dir_key': appDirKey
|
||||||
'prefsFile': self.prefsFile,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.sequential:
|
if self.sequential:
|
||||||
|
|||||||
Reference in New Issue
Block a user