Bug 821866 - Fix and enable marAppApplyUpdateSuccess.js and marAppApplyUpdateStageSuccess.js xpcshell tests on B2G ICS Emulator opt. r=spohl
authorRobert Strong <robert.bugzilla@gmail.com>
Mon, 11 May 2015 13:16:55 -0700
changeset 243522 bde44865243f099e8ffab73524414fcaad5414f8
parent 243521 2aa2b837f12d181de17df9e422ac16c747b189a5
child 243523 a738c83c9f996179484ec7a8cc68f9a8128481c1
push id59683
push usercbook@mozilla.com
push dateTue, 12 May 2015 15:13:10 +0000
treeherdermozilla-inbound@ed36c6879944 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl
bugs821866
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 821866 - Fix and enable marAppApplyUpdateSuccess.js and marAppApplyUpdateStageSuccess.js xpcshell tests on B2G ICS Emulator opt. r=spohl
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -1797,17 +1797,17 @@ function setupAppFiles() {
   let appFiles = [ { relPath  : FILE_APP_BIN,
                      inGreDir : false },
                    { relPath  : FILE_APPLICATION_INI,
                      inGreDir : true },
                    { relPath  : "dependentlibs.list",
                      inGreDir : true } ];
 
   // On Linux the updater.png must also be copied
-  if (IS_UNIX && !IS_MACOSX) {
+  if (IS_UNIX && !IS_MACOSX && !IS_TOOLKIT_GONK) {
     appFiles.push( { relPath  : "icons/updater.png",
                      inGreDir : true } );
   }
 
   // Read the dependent libs file leafnames from the dependentlibs.list file
   // into the array.
   let deplibsFile = gGREDirOrig.clone();
   deplibsFile.append("dependentlibs.list");
@@ -1884,24 +1884,26 @@ function copyFileToTestAppDir(aFileRelPa
       if (pathParts[i]) {
         srcFile.append(pathParts[i] + (pathParts.length - 1 == i ? ".app" : ""));
         destFile.append(pathParts[i] + (pathParts.length - 1 == i ? ".app" : ""));
       }
     }
     fileRelPath = fileRelPath + ".app";
   }
 
-  Assert.ok(srcFile.exists(), MSG_SHOULD_EXIST);
+  Assert.ok(srcFile.exists(),
+            MSG_SHOULD_EXIST + ", leafName: " + srcFile.leafName);
 
   // Symlink libraries. Note that the XUL library on Mac OS X doesn't have a
   // file extension and shouldSymlink will always be false on Windows.
   let shouldSymlink = (pathParts[pathParts.length - 1] == "XUL" ||
                        fileRelPath.substr(fileRelPath.length - 3) == ".so" ||
                        fileRelPath.substr(fileRelPath.length - 6) == ".dylib");
-  if (!shouldSymlink) {
+  // The tests don't support symlinks on gonk.
+  if (!shouldSymlink || IS_TOOLKIT_GONK) {
     if (!destFile.exists()) {
       try {
         srcFile.copyToFollowingLinks(destFile.parent, destFile.leafName);
       } catch (e) {
         // Just in case it is partially copied
         if (destFile.exists()) {
           try {
             destFile.remove(true);
@@ -3205,17 +3207,17 @@ function overrideUpdatePrompt(aCallback)
 }
 
 function UpdatePrompt(aCallback) {
   this._callback = aCallback;
 
   let fns = ["checkForUpdates", "showUpdateAvailable", "showUpdateDownloaded",
              "showUpdateError", "showUpdateHistory", "showUpdateInstalled"];
 
-  fns.forEach(function(aPromptFn) {
+  fns.forEach(function UP_fns(aPromptFn) {
     UpdatePrompt.prototype[aPromptFn] = function() {
       if (!this._callback) {
         return;
       }
 
       let callback = this._callback[aPromptFn];
       if (!callback) {
         return;
--- a/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
+++ b/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
@@ -71,18 +71,18 @@ skip-if = os != 'win'
 [marFileInUseFallbackStageFailureComplete_win.js]
 skip-if = os != 'win'
 [marFileInUseFallbackStageFailurePartial_win.js]
 skip-if = os != 'win'
 [marRMRFDirFileInUseFallbackStageFailureComplete_win.js]
 skip-if = os != 'win'
 [marRMRFDirFileInUseFallbackStageFailurePartial_win.js]
 skip-if = os != 'win'
-reason = bug 820380
 [marAppApplyDirLockedStageFailure_win.js]
 skip-if = os != 'win'
 [marAppApplyUpdateAppBinInUseStageSuccess_win.js]
 skip-if = os != 'win'
 [marAppApplyUpdateSuccess.js]
-skip-if = toolkit == 'gonk'
-reason = bug 820380
+skip-if = debug == true && toolkit == 'gonk'
+reason = bug 1163354
 [marAppApplyUpdateStageSuccess.js]
-skip-if = toolkit == 'gonk'
+skip-if = debug == true && toolkit == 'gonk'
+reason = bug 1163354