From bedb1caf762495639ba0ffaab88d474cf7c69608 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 21 May 2015 11:50:34 -0400 Subject: [PATCH] Backed out changeset d39ba5b549c5 (bug 1165061) for LSAN leaks. a=me --- toolkit/mozapps/update/tests/chrome/chrome.ini | 6 ++++-- toolkit/mozapps/update/tests/chrome/utils.js | 2 -- toolkit/mozapps/update/tests/data/shared.js | 4 ---- toolkit/mozapps/update/updater/archivereader.cpp | 4 ++-- .../mozapps/update/updater/updater-xpcshell/moz.build | 2 +- toolkit/mozapps/update/updater/updater.cpp | 11 ----------- toolkit/mozapps/update/updater/updater.rc | 2 +- 7 files changed, 8 insertions(+), 23 deletions(-) diff --git a/toolkit/mozapps/update/tests/chrome/chrome.ini b/toolkit/mozapps/update/tests/chrome/chrome.ini index d8e942a783db..eb74447567fc 100644 --- a/toolkit/mozapps/update/tests/chrome/chrome.ini +++ b/toolkit/mozapps/update/tests/chrome/chrome.ini @@ -18,6 +18,8 @@ support-files = [test_0015_check_incompat_basic_addons.xul] [test_0016_check_incompat_basic_license_addons.xul] [test_0017_check_staging_basic.xul] +skip-if = os != 'win' +reason = Bug 918029 and bug 1164560 - timeout caused by copying too many files. [test_0021_check_billboard.xul] [test_0022_check_billboard_license.xul] [test_0023_check_incompat_billboard.xul] @@ -59,10 +61,10 @@ support-files = [test_0095_restartNotification_remoteInvalidNumber.xul] [test_0096_restartNotification_stagedBackground.xul] [test_0097_restartNotification_stagedServiceBackground.xul] -skip-if = os != 'win' -reason = only Windows has the maintenance service. [test_0101_background_restartNotification.xul] [test_0102_background_restartNotification_staging.xul] +skip-if = os == 'linux' +reason = Bug 918029 - timeout caused by copying too many files. [test_0103_background_restartNotification_stagingService.xul] skip-if = os != 'win' reason = only Windows has the maintenance service. diff --git a/toolkit/mozapps/update/tests/chrome/utils.js b/toolkit/mozapps/update/tests/chrome/utils.js index 12b12f412189..979e1a926cc5 100644 --- a/toolkit/mozapps/update/tests/chrome/utils.js +++ b/toolkit/mozapps/update/tests/chrome/utils.js @@ -330,7 +330,6 @@ function runTestDefaultWaitForWindowClosed() { setupFiles(); setupPrefs(); - gEnv.set("MOZ_TEST_SKIP_UPDATE_STAGE", "1"); removeUpdateDirsAndFiles(); reloadUpdateManagerData(); setupAddons(runTest); @@ -359,7 +358,6 @@ function finishTestDefault() { verifyTestsRan(); resetPrefs(); - gEnv.set("MOZ_TEST_SKIP_UPDATE_STAGE", ""); resetFiles(); removeUpdateDirsAndFiles(); reloadUpdateManagerData(); diff --git a/toolkit/mozapps/update/tests/data/shared.js b/toolkit/mozapps/update/tests/data/shared.js index d6ea47a7a1b7..dd5fd4365f96 100644 --- a/toolkit/mozapps/update/tests/data/shared.js +++ b/toolkit/mozapps/update/tests/data/shared.js @@ -130,10 +130,6 @@ XPCOMUtils.defineLazyGetter(this, "gPrefRoot", function test_gPR() { return Services.prefs.getBranch(null); }); -XPCOMUtils.defineLazyServiceGetter(this, "gEnv", - "@mozilla.org/process/environment;1", - "nsIEnvironment"); - XPCOMUtils.defineLazyGetter(this, "gZipW", function test_gZipW() { return Cc["@mozilla.org/zipwriter;1"]. createInstance(Ci.nsIZipWriter); diff --git a/toolkit/mozapps/update/updater/archivereader.cpp b/toolkit/mozapps/update/updater/archivereader.cpp index 90cf45c3dbd3..fe10327d4eb5 100644 --- a/toolkit/mozapps/update/updater/archivereader.cpp +++ b/toolkit/mozapps/update/updater/archivereader.cpp @@ -18,7 +18,7 @@ // These are generated at compile time based on the DER file for the channel // being used #ifdef MOZ_VERIFY_MAR_SIGNATURE -#ifdef TEST_UPDATER +#ifdef UPDATER_XPCSHELL_CERT #include "../xpcshellCert.h" #else #include "primaryCert.h" @@ -85,7 +85,7 @@ ArchiveReader::VerifySignature() #ifndef MOZ_VERIFY_MAR_SIGNATURE return OK; #else -#ifdef TEST_UPDATER +#ifdef UPDATER_XPCSHELL_CERT int rv = VerifyLoadedCert(mArchive, xpcshellCertData); #else int rv = VerifyLoadedCert(mArchive, primaryCertData); diff --git a/toolkit/mozapps/update/updater/updater-xpcshell/moz.build b/toolkit/mozapps/update/updater/updater-xpcshell/moz.build index ba5c844cfc10..eab7c708a41a 100644 --- a/toolkit/mozapps/update/updater/updater-xpcshell/moz.build +++ b/toolkit/mozapps/update/updater/updater-xpcshell/moz.build @@ -8,6 +8,6 @@ Program('updater-xpcshell') updater_rel_path = '../' DIST_INSTALL = False -DEFINES['TEST_UPDATER'] = True +DEFINES['UPDATER_XPCSHELL_CERT'] = True include('../updater-common.build') FAIL_ON_WARNINGS = True diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index 7f9048a5fddb..fc8ddfebf734 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -2260,18 +2260,7 @@ UpdateThreadFunc(void *param) #endif if (rv == OK && sStagedUpdate && !sIsOSUpdate) { -#ifdef TEST_UPDATER - // The MOZ_TEST_SKIP_UPDATE_STAGE environment variable prevents copying - // the files in dist/bin in the test updater when staging an update since - // this can cause tests to timeout. - if (getenv("MOZ_TEST_SKIP_UPDATE_STAGE")) { - rv = OK; - } else { - rv = CopyInstallDirToDestDir(); - } -#else rv = CopyInstallDirToDestDir(); -#endif } if (rv == OK) { diff --git a/toolkit/mozapps/update/updater/updater.rc b/toolkit/mozapps/update/updater/updater.rc index 7603eecb645a..707efeafda79 100644 --- a/toolkit/mozapps/update/updater/updater.rc +++ b/toolkit/mozapps/update/updater/updater.rc @@ -4,7 +4,7 @@ // Microsoft Visual C++ generated resource script. // -#ifdef TEST_UPDATER +#ifdef UPDATER_XPCSHELL_CERT #include "../resource.h" #define MANIFEST_PATH "../updater.exe.manifest" #define COMCTL32_MANIFEST_PATH "../updater.exe.comctl32.manifest"