Bug 1137946 - Disable app update verbose mochitest-chrome logging. r=spohl
authorRobert Strong <robert.bugzilla@gmail.com>
Mon, 02 Mar 2015 11:09:17 -0800
changeset 231472 ddbeb492edfb88f865e8b0b89d7874bea4e082a4
parent 231471 d1675b777f959746ae5f6c528aa9c61f52675929
child 231473 fa4247a2db1bed67ab1e3b05e5df1bef26865528
push id28352
push usercbook@mozilla.com
push dateTue, 03 Mar 2015 12:51:09 +0000
treeherdermozilla-central@e545f650c695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl
bugs1137946
milestone39.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 1137946 - Disable app update verbose mochitest-chrome logging. r=spohl
toolkit/mozapps/update/tests/chrome/utils.js
toolkit/mozapps/update/tests/data/shared.js
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ b/toolkit/mozapps/update/tests/chrome/utils.js
@@ -201,17 +201,17 @@ var gTestCounter = -1;
 var gWin;
 var gDocElem;
 var gPrefToCheck;
 var gDisableNoUpdateAddon = false;
 
 // Set to true to log additional information for debugging. To log additional
 // information for an individual test set DEBUG_AUS_TEST to true in the test's
 // onload function.
-var DEBUG_AUS_TEST = true;
+var DEBUG_AUS_TEST = false;
 
 const DATA_URI_SPEC = "chrome://mochitests/content/chrome/toolkit/mozapps/update/tests/data/";
 Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
 
 /**
  * The current test in TESTS array.
  */
 this.__defineGetter__("gTest", function() {
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ b/toolkit/mozapps/update/tests/data/shared.js
@@ -299,17 +299,17 @@ function writeFile(aFile, aText) {
  *
  * @return The status value.
  */
 function readStatusFile() {
   let file = getUpdatesPatchDir();
   file.append(FILE_UPDATE_STATUS);
 
   if (!file.exists()) {
-    logTestInfo("update status file does not exists! Path: " + file.path);
+    debugDump("update status file does not exists! Path: " + file.path);
     return STATE_NONE;
   }
 
   return readFile(file).split("\n")[0];
 }
 
 /**
  * Reads the current update operation/state in the status file in the patch
@@ -503,44 +503,44 @@ function cleanUpdatesDir(aDir) {
  *         nsIFile for the directory to be deleted.
  */
 function removeDirRecursive(aDir) {
   if (!aDir.exists()) {
     return;
   }
 
   try {
-    logTestInfo("attempting to remove directory. Path: " + aDir.path);
+    debugDump("attempting to remove directory. Path: " + aDir.path);
     aDir.remove(true);
     return;
   } catch (e) {
     logTestInfo("non-fatal error removing directory. Exception: " + e);
   }
 
   let dirEntries = aDir.directoryEntries;
   while (dirEntries.hasMoreElements()) {
     let entry = dirEntries.getNext().QueryInterface(Ci.nsIFile);
 
     if (entry.isDirectory()) {
       removeDirRecursive(entry);
     } else {
       entry.permissions = PERMS_FILE;
       try {
-        logTestInfo("attempting to remove file. Path: " + entry.path);
+        debugDump("attempting to remove file. Path: " + entry.path);
         entry.remove(false);
       } catch (e) {
         logTestInfo("error removing file. Exception: " + e);
         throw(e);
       }
     }
   }
 
   aDir.permissions = PERMS_DIRECTORY;
   try {
-    logTestInfo("attempting to remove directory. Path: " + aDir.path);
+    debugDump("attempting to remove directory. Path: " + aDir.path);
     aDir.remove(true);
   } catch (e) {
     logTestInfo("error removing directory. Exception: " + e);
     throw(e);
   }
 }
 
 /**