mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
Test only - additional logging for Bug 909489 - Intermittent test_0202_app_launch_apply_update_dirlocked.js | Test timed out | test failed (with xpcshell return code: 1). r=bbondy
This commit is contained in:
parent
2cd2506f4c
commit
7328385057
@ -590,8 +590,17 @@ function getUpdatedDir() {
|
||||
*/
|
||||
function logTestInfo(aText, aCaller) {
|
||||
let caller = (aCaller ? aCaller : Components.stack.caller);
|
||||
dump("TEST-INFO | " + caller.filename + " | [" + caller.name + " : " +
|
||||
caller.lineNumber + "] " + aText + "\n");
|
||||
let now = new Date;
|
||||
let hh = now.getHours();
|
||||
let mm = now.getMinutes();
|
||||
let ss = now.getSeconds();
|
||||
let ms = now.getMilliseconds();
|
||||
let time = (hh < 10 ? "0" + hh : hh) + ":" +
|
||||
(mm < 10 ? "0" + mm : mm) + ":" +
|
||||
(ss < 10 ? "0" + ss : ss) + ":" +
|
||||
(ms < 10 ? "00" + ms : ms < 100 ? "0" + ms : ms);
|
||||
dump(time + " | TEST-INFO | " + caller.filename + " | [" + caller.name +
|
||||
" : " + caller.lineNumber + "] " + aText + "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2076,13 +2076,16 @@ function shouldAdjustPathsOnMac() {
|
||||
* files.
|
||||
*/
|
||||
function adjustPathsOnWindows() {
|
||||
logTestInfo("start - setup new process directory");
|
||||
// We copy the entire GRE directory into another location so that xpcshell
|
||||
// running doesn't prevent the updater from moving stuff around.
|
||||
let tmpDir = do_get_profile();
|
||||
tmpDir.append("ExecutableDir.tmp");
|
||||
tmpDir.createUnique(tmpDir.DIRECTORY_TYPE, 0755);
|
||||
let procDir = getCurrentProcessDir();
|
||||
logTestInfo("start - copy the process directory");
|
||||
copyDirRecursive(procDir, tmpDir, "bin");
|
||||
logTestInfo("finish - copy the process directory");
|
||||
let newDir = tmpDir.clone();
|
||||
newDir.append("bin");
|
||||
gWindowsBinDir = newDir;
|
||||
@ -2113,6 +2116,7 @@ function adjustPathsOnWindows() {
|
||||
do_register_cleanup(function() {
|
||||
ds.unregisterProvider(dirProvider);
|
||||
});
|
||||
logTestInfo("finish - setup new process directory");
|
||||
}
|
||||
|
||||
let gWindowsBinDir = null;
|
||||
|
@ -105,6 +105,8 @@ function run_test() {
|
||||
do_test_pending();
|
||||
do_register_cleanup(end_test);
|
||||
|
||||
logTestInfo("setting up environment for the update test...");
|
||||
|
||||
removeUpdateDirsAndFiles();
|
||||
|
||||
symlinkUpdateFilesIntoBundleDirectory();
|
||||
@ -186,10 +188,12 @@ function run_test() {
|
||||
writeFile(updateSettingsIni, UPDATE_SETTINGS_CONTENTS);
|
||||
|
||||
// Initiate a background update.
|
||||
logTestInfo("update preparation completed - calling processUpdate");
|
||||
AUS_Cc["@mozilla.org/updates/update-processor;1"].
|
||||
createInstance(AUS_Ci.nsIUpdateProcessor).
|
||||
processUpdate(gActiveUpdate);
|
||||
|
||||
logTestInfo("processUpdate completed - calling checkUpdateApplied");
|
||||
checkUpdateApplied();
|
||||
}
|
||||
|
||||
@ -261,6 +265,8 @@ function checkUpdateApplied() {
|
||||
return;
|
||||
}
|
||||
|
||||
logTestInfo("update state equals " + gUpdateManager.activeUpdate.state);
|
||||
|
||||
// Don't proceed until the update status is pending.
|
||||
let status = readStatusFile();
|
||||
do_check_eq(status, STATE_PENDING);
|
||||
|
Loading…
x
Reference in New Issue
Block a user