mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1529043 - Part 6 (test only) - Make the setupUpdaterTest function async and change call sites so they use await. r=mhowell
Depends on D20797 Differential Revision: https://phabricator.services.mozilla.com/D20798 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6182bcea9a
commit
23ff831432
@ -2143,30 +2143,6 @@ function isBinarySigned(aBinPath) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper function for asynchronously setting up the application files required
|
|
||||||
* to launch the application for the updater tests by either copying or creating
|
|
||||||
* symlinks for the files. This is needed for Windows debug builds which can
|
|
||||||
* lock a file that is being copied so that the tests can run in parallel. After
|
|
||||||
* the files have been copied the setupUpdaterTestFinished function will be
|
|
||||||
* called.
|
|
||||||
*/
|
|
||||||
function setupAppFilesAsync() {
|
|
||||||
gTimeoutRuns++;
|
|
||||||
try {
|
|
||||||
setupAppFiles();
|
|
||||||
} catch (e) {
|
|
||||||
if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
|
|
||||||
do_throw("Exceeded MAX_TIMEOUT_RUNS while trying to setup application " +
|
|
||||||
"files! Exception: " + e);
|
|
||||||
}
|
|
||||||
executeSoon(setupAppFilesAsync);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
executeSoon(setupUpdaterTestFinished);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function for setting up the application files required to launch the
|
* Helper function for setting up the application files required to launch the
|
||||||
* application for the updater tests by either copying or creating symlinks to
|
* application for the updater tests by either copying or creating symlinks to
|
||||||
@ -2689,7 +2665,7 @@ async function waitForHelperExit() {
|
|||||||
* @param aSetupActiveUpdate
|
* @param aSetupActiveUpdate
|
||||||
* Whether to setup the active update.
|
* Whether to setup the active update.
|
||||||
*/
|
*/
|
||||||
function setupUpdaterTest(aMarFile, aPostUpdateAsync,
|
async function setupUpdaterTest(aMarFile, aPostUpdateAsync,
|
||||||
aPostUpdateExeRelPathPrefix = "",
|
aPostUpdateExeRelPathPrefix = "",
|
||||||
aSetupActiveUpdate = true) {
|
aSetupActiveUpdate = true) {
|
||||||
debugDump("start - updater test setup");
|
debugDump("start - updater test setup");
|
||||||
@ -2787,8 +2763,17 @@ function setupUpdaterTest(aMarFile, aPostUpdateAsync,
|
|||||||
createUpdaterINI(aPostUpdateAsync, aPostUpdateExeRelPathPrefix);
|
createUpdaterINI(aPostUpdateAsync, aPostUpdateExeRelPathPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await TestUtils.waitForCondition(() => {
|
||||||
|
try {
|
||||||
|
setupAppFiles();
|
||||||
|
return true;
|
||||||
|
} catch (e) {
|
||||||
|
logTestInfo("exception when calling setupAppFiles, Exception: " + e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}, "Waiting to setup app files");
|
||||||
|
|
||||||
debugDump("finish - updater test setup");
|
debugDump("finish - updater test setup");
|
||||||
setupAppFilesAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,20 +8,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_RUNUPDATE = STATE_FAILED_INVALID_CALLBACK_DIR_ERROR;
|
const STATE_AFTER_RUNUPDATE = STATE_FAILED_INVALID_CALLBACK_DIR_ERROR;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getTestDirFile(FILE_HELPER_BIN).path;
|
let path = getTestDirFile(FILE_HELPER_BIN).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -7,20 +7,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_RUNUPDATE = STATE_FAILED_INVALID_CALLBACK_PATH_ERROR;
|
const STATE_AFTER_RUNUPDATE = STATE_FAILED_INVALID_CALLBACK_PATH_ERROR;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "123456789";
|
let path = "123456789";
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = "\\" + path;
|
path = "\\" + path;
|
||||||
@ -30,7 +24,6 @@ async function setupUpdaterTestFinished() {
|
|||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
path = path.repeat(1000); // 10000 characters
|
path = path.repeat(1000); // 10000 characters
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -13,20 +13,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "123456789";
|
let path = "123456789";
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = "\\" + path;
|
path = "\\" + path;
|
||||||
@ -36,7 +30,6 @@ async function setupUpdaterTestFinished() {
|
|||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
path = path.repeat(1000); // 10000 characters
|
path = path.repeat(1000); // 10000 characters
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -13,27 +13,20 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "123456789";
|
let path = "123456789";
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = "C:\\" + path + "\\..\\" + path;
|
path = "C:\\" + path + "\\..\\" + path;
|
||||||
} else {
|
} else {
|
||||||
path = "/" + path + "/../" + path;
|
path = "/" + path + "/../" + path;
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -14,20 +14,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getApplyDirFile("..", false).path;
|
let path = getApplyDirFile("..", false).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -8,27 +8,20 @@
|
|||||||
const STATE_AFTER_RUNUPDATE =
|
const STATE_AFTER_RUNUPDATE =
|
||||||
IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getUpdateDirFile(DIR_PATCH);
|
let path = getUpdateDirFile(DIR_PATCH);
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = path + "\\..\\";
|
path = path + "\\..\\";
|
||||||
} else {
|
} else {
|
||||||
path = path + "/../";
|
path = path + "/../";
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -15,20 +15,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getApplyDirFile("..", false).path;
|
let path = getApplyDirFile("..", false).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -14,20 +14,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "\\\\.\\" + getApplyDirFile(null, false).path;
|
let path = "\\\\.\\" + getApplyDirFile(null, false).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -14,20 +14,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -9,22 +9,15 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_PENDING;
|
const STATE_AFTER_STAGE = STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
createUpdateInProgressLockFile(getGREBinDir());
|
createUpdateInProgressLockFile(getGREBinDir());
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(false);
|
stageUpdate(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,20 +9,13 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,20 +11,13 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_APPLIED;
|
const STATE_AFTER_STAGE = STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, null, "", false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, null, "", false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
let patchProps = {state: STATE_AFTER_STAGE};
|
let patchProps = {state: STATE_AFTER_STAGE};
|
||||||
let patches = getLocalPatchString(patchProps);
|
let patches = getLocalPatchString(patchProps);
|
||||||
let updateProps = {appVersion: "0.9"};
|
let updateProps = {appVersion: "0.9"};
|
||||||
|
@ -9,20 +9,13 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,23 +7,16 @@
|
|||||||
* apply it.
|
* apply it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
// The third parameter will test that a full path to the post update binary
|
// The third parameter will test that a full path to the post update binary
|
||||||
// doesn't execute.
|
// doesn't execute.
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, undefined,
|
await setupUpdaterTest(FILE_COMPLETE_MAR, undefined,
|
||||||
getApplyDirFile(null, true).path + "/");
|
getApplyDirFile(null, true).path + "/");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
runUpdateUsingApp(STATE_SUCCEEDED);
|
runUpdateUsingApp(STATE_SUCCEEDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,19 +7,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
const START_STATE = STATE_PENDING;
|
const START_STATE = STATE_PENDING;
|
||||||
const STATE_AFTER_STAGE = STATE_APPLIED;
|
const STATE_AFTER_STAGE = STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,13 +16,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
|
gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
|
||||||
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
setupSymLinks();
|
setupSymLinks();
|
||||||
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* Application in use complete MAR file patch apply success test */
|
/* Application in use complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* Replace app binary complete MAR file patch apply success test */
|
/* Replace app binary complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* Patch app binary partial MAR file patch apply success test */
|
/* Patch app binary partial MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* General Partial MAR File Patch Apply Failure Test */
|
/* General Partial MAR File Patch Apply Failure Test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -13,13 +13,7 @@ function run_test() {
|
|||||||
gTestFiles[11].originalFile = "partial.png";
|
gTestFiles[11].originalFile = "partial.png";
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
// If execv is used the updater process will turn into the callback process
|
// If execv is used the updater process will turn into the callback process
|
||||||
// and the updater's return code will be that of the callback process.
|
// and the updater's return code will be that of the callback process.
|
||||||
runUpdate(STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE,
|
runUpdate(STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE,
|
||||||
|
@ -7,19 +7,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
||||||
false);
|
false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -7,19 +7,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
||||||
false);
|
false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* File in use complete MAR file patch apply success test */
|
/* File in use complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
||||||
false);
|
false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* File in use partial MAR file patch apply success test */
|
/* File in use partial MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
||||||
false);
|
false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* File locked complete MAR file patch apply failure test */
|
/* File locked complete MAR file patch apply failure test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[3]);
|
await runHelperLockFile(gTestFiles[3]);
|
||||||
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
|
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* File locked partial MAR file patch apply failure test */
|
/* File locked partial MAR file patch apply failure test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[2]);
|
await runHelperLockFile(gTestFiles[2]);
|
||||||
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
|
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_PENDING;
|
const STATE_AFTER_STAGE = STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[3]);
|
await runHelperLockFile(gTestFiles[3]);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_PENDING;
|
const STATE_AFTER_STAGE = STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[2]);
|
await runHelperLockFile(gTestFiles[2]);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* Test update-settings.ini missing channel MAR security check */
|
/* Test update-settings.ini missing channel MAR security check */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -17,13 +17,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 2].originalContents = null;
|
gTestFiles[gTestFiles.length - 2].originalContents = null;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
// If execv is used the updater process will turn into the callback process
|
// If execv is used the updater process will turn into the callback process
|
||||||
// and the updater's return code will be that of the callback process.
|
// and the updater's return code will be that of the callback process.
|
||||||
runUpdate(STATE_FAILED_UPDATE_SETTINGS_FILE_CHANNEL,
|
runUpdate(STATE_FAILED_UPDATE_SETTINGS_FILE_CHANNEL,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
const STATE_AFTER_STAGE = STATE_FAILED;
|
const STATE_AFTER_STAGE = STATE_FAILED;
|
||||||
gStagingRemovedUpdate = true;
|
gStagingRemovedUpdate = true;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -20,13 +20,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 2].originalContents = null;
|
gTestFiles[gTestFiles.length - 2].originalContents = null;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* Application in use complete MAR file patch apply success test */
|
/* Application in use complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperPIDPersists(DIR_RESOURCES + gCallbackBinFile, false);
|
await runHelperPIDPersists(DIR_RESOURCES + gCallbackBinFile, false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -8,19 +8,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
||||||
gTestDirs[4].subDirFiles[0], true);
|
gTestDirs[4].subDirFiles[0], true);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -8,20 +8,15 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0],
|
||||||
|
true);
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* File in use inside removed dir complete MAR file patch apply success test */
|
/* File in use inside removed dir complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
||||||
gTestDirs[4].subDirFiles[0], true);
|
gTestDirs[4].subDirFiles[0], true);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
|
@ -4,20 +4,15 @@
|
|||||||
|
|
||||||
/* File in use inside removed dir partial MAR file patch apply success test */
|
/* File in use inside removed dir partial MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0],
|
||||||
|
true);
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
const STATE_AFTER_STAGE = STATE_FAILED;
|
const STATE_AFTER_STAGE = STATE_FAILED;
|
||||||
gStagingRemovedUpdate = true;
|
gStagingRemovedUpdate = true;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,13 +16,7 @@ function run_test() {
|
|||||||
gTestFiles[11].originalFile = "partial.png";
|
gTestFiles[11].originalFile = "partial.png";
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -17,13 +17,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupSymLinks();
|
setupSymLinks();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -17,13 +17,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
preventDistributionFiles();
|
preventDistributionFiles();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, true);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,20 +5,14 @@
|
|||||||
|
|
||||||
/* General Complete MAR File Patch Apply Test */
|
/* General Complete MAR File Patch Apply Test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
preventDistributionFiles();
|
preventDistributionFiles();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
checkAppBundleModTime();
|
checkAppBundleModTime();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* General Partial MAR File Patch Apply Test */
|
/* General Partial MAR File Patch Apply Test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,13 +16,7 @@ function run_test() {
|
|||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
// The third parameter will test that a relative path that contains a
|
// The third parameter will test that a relative path that contains a
|
||||||
// directory traversal to the post update binary doesn't execute.
|
// directory traversal to the post update binary doesn't execute.
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
checkAppBundleModTime();
|
checkAppBundleModTime();
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* Test version downgrade MAR security check */
|
/* Test version downgrade MAR security check */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,13 +16,7 @@ function run_test() {
|
|||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_OLD_VERSION_MAR, false);
|
await setupUpdaterTest(FILE_OLD_VERSION_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
// If execv is used the updater process will turn into the callback process
|
// If execv is used the updater process will turn into the callback process
|
||||||
// and the updater's return code will be that of the callback process.
|
// and the updater's return code will be that of the callback process.
|
||||||
runUpdate(STATE_FAILED_VERSION_DOWNGRADE_ERROR,
|
runUpdate(STATE_FAILED_VERSION_DOWNGRADE_ERROR,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* Test product/channel MAR security check */
|
/* Test product/channel MAR security check */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -18,13 +18,7 @@ function run_test() {
|
|||||||
UPDATE_SETTINGS_CONTENTS.replace("xpcshell-test", "wrong-channel");
|
UPDATE_SETTINGS_CONTENTS.replace("xpcshell-test", "wrong-channel");
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
// If execv is used the updater process will turn into the callback process
|
// If execv is used the updater process will turn into the callback process
|
||||||
// and the updater's return code will be that of the callback process.
|
// and the updater's return code will be that of the callback process.
|
||||||
runUpdate(STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR,
|
runUpdate(STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
const STATE_AFTER_STAGE = STATE_FAILED;
|
const STATE_AFTER_STAGE = STATE_FAILED;
|
||||||
gStagingRemovedUpdate = true;
|
gStagingRemovedUpdate = true;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
if (!MOZ_VERIFY_MAR_SIGNATURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -21,13 +21,7 @@ function run_test() {
|
|||||||
UPDATE_SETTINGS_CONTENTS.replace("xpcshell-test", "wrong-channel");
|
UPDATE_SETTINGS_CONTENTS.replace("xpcshell-test", "wrong-channel");
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
/* Bootstrap the tests using the service by installing our own version of the service */
|
/* Bootstrap the tests using the service by installing our own version of the service */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -12,13 +12,7 @@ function run_test() {
|
|||||||
// application return code and update.status result.
|
// application return code and update.status result.
|
||||||
gTestFiles = gTestFilesCommon;
|
gTestFiles = gTestFilesCommon;
|
||||||
gTestDirs = [];
|
gTestDirs = [];
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, null);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, null);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
checkFilesAfterUpdateSuccess(getApplyDirFile, false, false);
|
checkFilesAfterUpdateSuccess(getApplyDirFile, false, false);
|
||||||
|
|
||||||
|
@ -13,20 +13,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "123456789";
|
let path = "123456789";
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = "\\" + path;
|
path = "\\" + path;
|
||||||
@ -36,7 +30,6 @@ async function setupUpdaterTestFinished() {
|
|||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
path = path.repeat(1000); // 10000 characters
|
path = path.repeat(1000); // 10000 characters
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -13,27 +13,20 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "123456789";
|
let path = "123456789";
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = "C:\\" + path + "\\..\\" + path;
|
path = "C:\\" + path + "\\..\\" + path;
|
||||||
} else {
|
} else {
|
||||||
path = "/" + path + "/../" + path;
|
path = "/" + path + "/../" + path;
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -14,20 +14,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getApplyDirFile("..", false).path;
|
let path = getApplyDirFile("..", false).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -8,20 +8,14 @@
|
|||||||
const STATE_AFTER_RUNUPDATE =
|
const STATE_AFTER_RUNUPDATE =
|
||||||
IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getUpdateDirFile(DIR_PATCH).parent.path;
|
let path = getUpdateDirFile(DIR_PATCH).parent.path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -8,27 +8,20 @@
|
|||||||
const STATE_AFTER_RUNUPDATE =
|
const STATE_AFTER_RUNUPDATE =
|
||||||
IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getUpdateDirFile(DIR_PATCH);
|
let path = getUpdateDirFile(DIR_PATCH);
|
||||||
if (AppConstants.platform == "win") {
|
if (AppConstants.platform == "win") {
|
||||||
path = path + "\\..\\";
|
path = path + "\\..\\";
|
||||||
} else {
|
} else {
|
||||||
path = path + "/../";
|
path = path + "/../";
|
||||||
}
|
}
|
||||||
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -15,20 +15,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = getApplyDirFile("..", false).path;
|
let path = getApplyDirFile("..", false).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -14,20 +14,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
let path = "\\\\.\\" + getApplyDirFile(null, false).path;
|
let path = "\\\\.\\" + getApplyDirFile(null, false).path;
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -14,20 +14,14 @@ const STATE_AFTER_RUNUPDATE_SERVICE = AppConstants.EARLY_BETA_OR_EARLIER
|
|||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_AFTER_RUNUPDATE_SERVICE
|
||||||
: STATE_AFTER_RUNUPDATE_BASE;
|
: STATE_AFTER_RUNUPDATE_BASE;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
|
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
|
||||||
standardInit();
|
standardInit();
|
||||||
checkPostUpdateRunningFile(false);
|
checkPostUpdateRunningFile(false);
|
||||||
|
@ -9,22 +9,15 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_PENDING;
|
const STATE_AFTER_STAGE = STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
createUpdateInProgressLockFile(getGREBinDir());
|
createUpdateInProgressLockFile(getGREBinDir());
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(false);
|
stageUpdate(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,20 +9,13 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,20 +9,13 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,23 +7,16 @@
|
|||||||
* apply it.
|
* apply it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
// The third parameter will test that a full path to the post update binary
|
// The third parameter will test that a full path to the post update binary
|
||||||
// doesn't execute.
|
// doesn't execute.
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, undefined,
|
await setupUpdaterTest(FILE_COMPLETE_MAR, undefined,
|
||||||
getApplyDirFile(null, true).path + "/");
|
getApplyDirFile(null, true).path + "/");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
runUpdateUsingApp(STATE_SUCCEEDED);
|
runUpdateUsingApp(STATE_SUCCEEDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,19 +7,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* Application in use complete MAR file patch apply success test */
|
/* Application in use complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
await runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* Replace app binary complete MAR file patch apply success test */
|
/* Replace app binary complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* Patch app binary partial MAR file patch apply success test */
|
/* Patch app binary partial MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
gCallbackBinFile = "exe0.exe";
|
gCallbackBinFile = "exe0.exe";
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
standardInit();
|
standardInit();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* General Partial MAR File Patch Apply Failure Test */
|
/* General Partial MAR File Patch Apply Failure Test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -13,13 +13,7 @@ function run_test() {
|
|||||||
gTestFiles[11].originalFile = "partial.png";
|
gTestFiles[11].originalFile = "partial.png";
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
// If execv is used the updater process will turn into the callback process
|
// If execv is used the updater process will turn into the callback process
|
||||||
// and the updater's return code will be that of the callback process.
|
// and the updater's return code will be that of the callback process.
|
||||||
runUpdate(STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE,
|
runUpdate(STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE,
|
||||||
|
@ -7,19 +7,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
||||||
false);
|
false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -7,19 +7,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
||||||
false);
|
false);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* File in use complete MAR file patch apply success test */
|
/* File in use complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
await runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
|
||||||
false);
|
false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* File in use partial MAR file patch apply success test */
|
/* File in use partial MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
await runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
|
||||||
false);
|
false);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* File locked complete MAR file patch apply failure test */
|
/* File locked complete MAR file patch apply failure test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[3]);
|
await runHelperLockFile(gTestFiles[3]);
|
||||||
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
|
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -4,20 +4,14 @@
|
|||||||
|
|
||||||
/* File locked partial MAR file patch apply failure test */
|
/* File locked partial MAR file patch apply failure test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[2]);
|
await runHelperLockFile(gTestFiles[2]);
|
||||||
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
|
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_PENDING;
|
const STATE_AFTER_STAGE = STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[3]);
|
await runHelperLockFile(gTestFiles[3]);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,14 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = STATE_PENDING;
|
const STATE_AFTER_STAGE = STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperLockFile(gTestFiles[2]);
|
await runHelperLockFile(gTestFiles[2]);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
@ -8,19 +8,13 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
||||||
gTestDirs[4].subDirFiles[0], true);
|
gTestDirs[4].subDirFiles[0], true);
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
|
@ -8,20 +8,15 @@
|
|||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0],
|
||||||
|
true);
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,19 +4,13 @@
|
|||||||
|
|
||||||
/* File in use inside removed dir complete MAR file patch apply success test */
|
/* File in use inside removed dir complete MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
await runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
|
||||||
gTestDirs[4].subDirFiles[0], true);
|
gTestDirs[4].subDirFiles[0], true);
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
|
@ -4,20 +4,15 @@
|
|||||||
|
|
||||||
/* File in use inside removed dir partial MAR file patch apply success test */
|
/* File in use inside removed dir partial MAR file patch apply success test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesPartialSuccess;
|
gTestFiles = gTestFilesPartialSuccess;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0],
|
||||||
|
true);
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
await runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await waitForHelperExit();
|
await waitForHelperExit();
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
const STATE_AFTER_STAGE = STATE_FAILED;
|
const STATE_AFTER_STAGE = STATE_FAILED;
|
||||||
gStagingRemovedUpdate = true;
|
gStagingRemovedUpdate = true;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,13 +16,7 @@ function run_test() {
|
|||||||
gTestFiles[11].originalFile = "partial.png";
|
gTestFiles[11].originalFile = "partial.png";
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
setTestFilesAndDirsForFailure();
|
setTestFilesAndDirsForFailure();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -17,13 +17,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
setupSymLinks();
|
setupSymLinks();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -17,13 +17,7 @@ function run_test() {
|
|||||||
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
|
||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
preventDistributionFiles();
|
preventDistributionFiles();
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, true);
|
await setupUpdaterTest(FILE_PARTIAL_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
function setupUpdaterTestFinished() {
|
|
||||||
stageUpdate(true);
|
stageUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,20 +5,14 @@
|
|||||||
|
|
||||||
/* General Complete MAR File Patch Apply Test */
|
/* General Complete MAR File Patch Apply Test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gTestFiles = gTestFilesCompleteSuccess;
|
gTestFiles = gTestFilesCompleteSuccess;
|
||||||
gTestDirs = gTestDirsCompleteSuccess;
|
gTestDirs = gTestDirsCompleteSuccess;
|
||||||
preventDistributionFiles();
|
preventDistributionFiles();
|
||||||
setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
await setupUpdaterTest(FILE_COMPLETE_MAR, true);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
await checkPostUpdateAppLog();
|
await checkPostUpdateAppLog();
|
||||||
checkAppBundleModTime();
|
checkAppBundleModTime();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/* General Partial MAR File Patch Apply Test */
|
/* General Partial MAR File Patch Apply Test */
|
||||||
|
|
||||||
function run_test() {
|
async function run_test() {
|
||||||
if (!setupTestCommon()) {
|
if (!setupTestCommon()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,13 +16,7 @@ function run_test() {
|
|||||||
gTestDirs = gTestDirsPartialSuccess;
|
gTestDirs = gTestDirsPartialSuccess;
|
||||||
// The third parameter will test that a relative path that contains a
|
// The third parameter will test that a relative path that contains a
|
||||||
// directory traversal to the post update binary doesn't execute.
|
// directory traversal to the post update binary doesn't execute.
|
||||||
setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
|
await setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the call to setupUpdaterTest finishes.
|
|
||||||
*/
|
|
||||||
async function setupUpdaterTestFinished() {
|
|
||||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||||
checkAppBundleModTime();
|
checkAppBundleModTime();
|
||||||
standardInit();
|
standardInit();
|
||||||
|
Loading…
Reference in New Issue
Block a user