Bug 1542362 (xpcshell test only) - Fix intermittent marAppApplyUpdateStageSuccessSvc.js failure. r=bytesized
authorRobert Strong <robert.bugzilla@gmail.com>
Mon, 20 May 2019 16:19:22 +0000
changeset 474556 d9cfca9f112f29bffc562a979c3c0e35ae74ac27
parent 474555 68b3e0acc50371007c682e55c79158d98d6325ae
child 474557 5db8c1e9f643ec26fc93e7a3fc7a90c742b11030
push id36042
push userdvarga@mozilla.com
push dateTue, 21 May 2019 04:19:40 +0000
treeherdermozilla-central@ca560ff55451 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbytesized
bugs1542362
milestone69.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 1542362 (xpcshell test only) - Fix intermittent marAppApplyUpdateStageSuccessSvc.js failure. r=bytesized When there were multiple matches the regexp included the newline from the previous match which caused the next match to fail Differential Revision: https://phabricator.services.mozilla.com/D31739
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -2877,20 +2877,20 @@ function checkUpdateLogContents(aCompare
     updateLogContents = updateLogContents.replace(/^ensure_remove: failed to remove file: .*$/mg, "");
     updateLogContents = updateLogContents.replace(/^ensure_remove_recursive: unable to remove directory: .*$/mg, "");
     updateLogContents = updateLogContents.replace(/^Removing tmpDir failed, err: -1$/mg, "");
     updateLogContents = updateLogContents.replace(/^remove_recursive_on_reboot: .*$/mg, "");
     // Replace requests will retry renaming the installation directory 10 times
     // when there are files still in use. The following will remove the
     // additional entries from the log file when this happens so the log check
     // passes.
-    let re = new RegExp("\n" + ERR_RENAME_FILE + "[^\n]*\n" +
+    let re = new RegExp(ERR_RENAME_FILE + "[^\n]*\n" +
                         "PerformReplaceRequest: destDir rename[^\n]*\n" +
                         "rename_file: proceeding to rename the directory\n", "g");
-    updateLogContents = updateLogContents.replace(re, "\n");
+    updateLogContents = updateLogContents.replace(re, "");
   }
 
   // Replace error codes since they are different on each platform.
   updateLogContents = updateLogContents.replace(/, err:.*\n/g, "\n");
   // Replace to make the log parsing happy.
   updateLogContents = updateLogContents.replace(/non-fatal error /g, "");
   // Remove consecutive newlines
   updateLogContents = updateLogContents.replace(/\n+/g, "\n");