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:
arthur.iakab
2018-10-26 19:42:33 +03:00
parent b8952e2dea
commit 0043db55af
10 changed files with 23 additions and 85 deletions

View File

@@ -539,12 +539,6 @@ ARCHIVE_FILES = {
'pattern': 'automation.py',
'dest': 'xpcshell',
},
{
'source': buildconfig.topsrcdir,
'base': 'testing/profiles',
'pattern': '**',
'dest': 'xpcshell/profile_data',
},
],
'updater-dep': [
{

View File

@@ -121,9 +121,6 @@ class BaseProfile(object):
self.set_preferences(prefs, filename=basename)
extension_dir = os.path.join(other, 'extensions')
if not os.path.isdir(extension_dir):
return
for basename in os.listdir(extension_dir):
path = os.path.join(extension_dir, basename)

View File

@@ -1,2 +0,0 @@
Dropping extensions here will get them installed in all test harnesses
that make use of this profile.

View File

@@ -1,3 +0,0 @@
// Empty base preferences file used by everything.
// This is useful for testing a pref on try.
/* globals user_pref */

View File

@@ -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 */
user_pref("app.update.disabledForTesting", true);
user_pref("browser.chrome.guess_favicon", false);

View File

@@ -1,10 +1,9 @@
{
"mochitest": ["base", "common", "unittest"],
"profileserver": ["base", "common", "unittest", "profileserver"],
"raptor": ["base", "common", "perf", "raptor"],
"reftest": ["base", "common", "reftest"],
"talos": ["base", "common", "perf"],
"valgrind": ["base", "common", "unittest"],
"xpcshell": ["base", "xpcshell"],
"web-platform-tests": ["base", "common", "unittest", "web-platform"]
"mochitest": ["common", "unittest"],
"profileserver": ["common", "unittest", "profileserver"],
"raptor": ["common", "perf", "raptor"],
"reftest": ["common", "reftest"],
"talos": ["common", "perf"],
"valgrind": ["common", "unittest"],
"web-platform-tests": ["common", "unittest", "web-platform"]
}

View File

@@ -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");

View File

@@ -12,8 +12,7 @@
/* defined by the harness */
/* globals _HEAD_FILES, _HEAD_JS_PATH, _JSDEBUGGER_PORT, _JSCOV_DIR,
_MOZINFO_JS_PATH, _TEST_FILE, _TEST_NAME, _TESTING_MODULES_DIR:true,
_PREFS_FILE */
_MOZINFO_JS_PATH, _TEST_FILE, _TEST_NAME, _TESTING_MODULES_DIR:true */
/* defined by XPCShellImpl.cpp */
/* globals load, sendCommand */
@@ -1480,10 +1479,18 @@ function run_next_test() {
try {
// Set global preferences
if (runningInParent) {
let prefsFile = Cc["@mozilla.org/file/local;1"]
.createInstance(Ci.nsIFile);
prefsFile.initWithPath(_PREFS_FILE);
_Services.prefs.readUserPrefsFromFile(prefsFile);
// Always use network provider for geolocation tests
// so we bypass the OSX dialog raised by the corelocation provider
_Services.prefs.setBoolPref("geo.provider.testing", true);
// 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
// selected by default).

View File

@@ -348,15 +348,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
self.device.chmod(remoteWrapper, root=True)
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):
self.buildCoreEnvironment()
self.setLD_LIBRARY_PATH()

View File

@@ -76,7 +76,6 @@ from mozlog import commandline
import mozcrash
import mozfile
import mozinfo
from mozprofile import Profile
from mozrunner.utils import get_stack_fixer_function
# --------------------------------------------------------------
@@ -157,7 +156,6 @@ class XPCShellTestThread(Thread):
self.log = kwargs.get('log')
self.app_dir_key = kwargs.get('app_dir_key')
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
# the harness
@@ -404,6 +402,7 @@ class XPCShellTestThread(Thread):
dbgport = 0 if self.jsDebuggerInfo is None else self.jsDebuggerInfo.port
return [
'-e', 'const _SERVER_ADDR = "localhost"',
'-e', 'const _HEAD_FILES = [%s];' % cmdH,
'-e', 'const _JSDEBUGGER_PORT = %d;' % dbgport,
]
@@ -449,7 +448,6 @@ class XPCShellTestThread(Thread):
'-s',
'-e', 'const _HEAD_JS_PATH = "%s";' % self.headJSPath,
'-e', 'const _MOZINFO_JS_PATH = "%s";' % self.mozInfoJSPath,
'-e', 'const _PREFS_FILE = "%s";' % self.prefsFile.replace('\\', '\\\\'),
]
if self.testingModulesDir:
@@ -946,33 +944,6 @@ class XPCShellTests(object):
if self.mozInfo is None:
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):
"""
Add environment variables likely to be used across all platforms, including
@@ -1275,7 +1246,6 @@ class XPCShellTests(object):
self.todoCount = 0
self.setAbsPath()
self.buildPrefsFile()
self.buildXpcsRunArgs()
self.event = Event()
@@ -1346,8 +1316,7 @@ class XPCShellTests(object):
'keep_going': self.keepGoing,
'log': self.log,
'interactive': self.interactive,
'app_dir_key': appDirKey,
'prefsFile': self.prefsFile,
'app_dir_key': appDirKey
}
if self.sequential: