mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
6. test patch 2 - Bug 386760 - directory removal with software update. r=dolske
--HG-- rename : toolkit/mozapps/update/test/unit/data/partial_in_use_win.mar => toolkit/mozapps/update/test/unit/data/partial_win.mar
This commit is contained in:
parent
cb19eb37ad
commit
629fdb4fa4
@ -90,12 +90,6 @@ USE_STATIC_LIBS = 1
|
||||
DEFINES += -DUNICODE -D_UNICODE
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
USE_STATIC_LIBS = 1
|
||||
DEFINES += -DUNICODE -D_UNICODE
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# TestAUSReadStrings runs during check in the following directory with a Unicode
|
||||
|
@ -144,54 +144,25 @@ int NS_main(int argc, NS_tchar **argv)
|
||||
|
||||
int i = 0;
|
||||
|
||||
#ifdef WINCE
|
||||
NS_tchar cwd[MAXPATHLEN];
|
||||
if (argv[1][wcslen(argv[1]) - 1] != NS_T('/') &&
|
||||
argv[1][wcslen(argv[1]) - 1] != NS_T('\\')) {
|
||||
NS_tsnprintf(cwd, sizeof(cwd)/sizeof(cwd[0]),
|
||||
NS_T("%s"), argv[1]);
|
||||
} else {
|
||||
NS_tsnprintf(cwd, sizeof(cwd)/sizeof(cwd[0]),
|
||||
NS_T("%s/"), argv[1]);
|
||||
}
|
||||
#else
|
||||
if (NS_tchdir(argv[1]) != 0) {
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
// File in use test helper section
|
||||
if (!NS_tstrcmp(argv[4], NS_T("-s"))) {
|
||||
#ifdef WINCE
|
||||
NS_tchar inFilePath[MAXPATHLEN];
|
||||
NS_tsnprintf(inFilePath, sizeof(inFilePath)/sizeof(inFilePath[0]),
|
||||
NS_T("%s%s"), cwd, argv[2]);
|
||||
NS_tchar outFilePath[MAXPATHLEN];
|
||||
NS_tsnprintf(outFilePath, sizeof(outFilePath)/sizeof(outFilePath[0]),
|
||||
NS_T("%s%s"), cwd, argv[3]);
|
||||
#else
|
||||
NS_tchar inFilePath[MAXPATHLEN];
|
||||
NS_tsnprintf(inFilePath, sizeof(inFilePath)/sizeof(inFilePath[0]),
|
||||
NS_T("%s"), argv[2]);
|
||||
NS_tchar outFilePath[MAXPATHLEN];
|
||||
NS_tsnprintf(outFilePath, sizeof(outFilePath)/sizeof(outFilePath[0]),
|
||||
NS_T("%s"), argv[3]);
|
||||
#endif
|
||||
|
||||
int seconds = NS_ttoi(argv[5]);
|
||||
#ifdef XP_WIN
|
||||
HANDLE hFile = INVALID_HANDLE_VALUE;
|
||||
if (argc == 7) {
|
||||
#ifdef WINCE
|
||||
NS_tchar lockfile[MAXPATHLEN];
|
||||
NS_tsnprintf(lockfile, sizeof(lockfile)/sizeof(lockfile[0]),
|
||||
NS_T("%s%s"), cwd, argv[6]);
|
||||
hFile = CreateFileW(lockfile,
|
||||
GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
#else
|
||||
hFile = CreateFileW(argv[6],
|
||||
DELETE | GENERIC_WRITE, 0,
|
||||
#endif
|
||||
NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
WriteMsg(outFilePath, "error_locking");
|
||||
@ -219,13 +190,8 @@ int NS_main(int argc, NS_tchar **argv)
|
||||
|
||||
// Command line argument test helper section
|
||||
NS_tchar logFilePath[MAXPATHLEN];
|
||||
#ifdef WINCE
|
||||
NS_tsnprintf(logFilePath, sizeof(logFilePath)/sizeof(logFilePath[0]),
|
||||
NS_T("%s%s"), cwd, argv[2]);
|
||||
#else
|
||||
NS_tsnprintf(logFilePath, sizeof(logFilePath)/sizeof(logFilePath[0]),
|
||||
NS_T("%s"), argv[2]);
|
||||
#endif
|
||||
|
||||
FILE* logFP = NS_tfopen(logFilePath, NS_T("wb"));
|
||||
for (i = 1; i < argc; ++i) {
|
||||
|
353
toolkit/mozapps/update/test/unit/data/complete_cc_log_success
Normal file
353
toolkit/mozapps/update/test/unit/data/complete_cc_log_success
Normal file
@ -0,0 +1,353 @@
|
||||
DoUpdate: changing update channel
|
||||
UPDATE TYPE complete
|
||||
PREPARE REMOVEFILE precomplete
|
||||
PREPARE REMOVEFILE a/b/searchplugins/searchpluginstext0
|
||||
PREPARE REMOVEFILE a/b/searchplugins/searchpluginspng0.png
|
||||
PREPARE REMOVEFILE a/b/removed-files
|
||||
PREPARE REMOVEFILE a/b/extensions/extensions1/extensions1png1.png
|
||||
PREPARE REMOVEFILE a/b/extensions/extensions0/extensions0text0
|
||||
PREPARE REMOVEFILE a/b/exe0.exe
|
||||
PREPARE REMOVEFILE a/b/defaults/pref/channel-prefs.js
|
||||
PREPARE REMOVEFILE a/b/2/20/20text0
|
||||
PREPARE REMOVEFILE a/b/2/20/20png0.png
|
||||
PREPARE REMOVEFILE a/b/0/0exe0.exe
|
||||
PREPARE REMOVEFILE a/b/0/00/00text0
|
||||
PREPARE REMOVEDIR a/b/searchplugins/
|
||||
PREPARE REMOVEDIR a/b/extensions/extensions1/
|
||||
PREPARE REMOVEDIR a/b/extensions/extensions0/
|
||||
PREPARE REMOVEDIR a/b/extensions/
|
||||
PREPARE REMOVEDIR a/b/defaults/pref/
|
||||
PREPARE REMOVEDIR a/b/defaults/
|
||||
PREPARE REMOVEDIR a/b/2/20/
|
||||
PREPARE REMOVEDIR a/b/2/
|
||||
PREPARE REMOVEDIR a/b/0/00/
|
||||
PREPARE REMOVEDIR a/b/0/
|
||||
PREPARE REMOVEDIR a/b/
|
||||
PREPARE REMOVEDIR a/
|
||||
PREPARE ADD a/b/defaults/pref/channel-prefs.js
|
||||
PREPARE ADD precomplete
|
||||
PREPARE ADD a/b/searchplugins/searchpluginstext0
|
||||
PREPARE ADD a/b/searchplugins/searchpluginspng1.png
|
||||
PREPARE ADD a/b/searchplugins/searchpluginspng0.png
|
||||
PREPARE ADD a/b/removed-files
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1text0
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1png1.png
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1png0.png
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0text0
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0png1.png
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0png0.png
|
||||
PREPARE ADD a/b/exe0.exe
|
||||
PREPARE ADD a/b/1/10/10text0
|
||||
PREPARE ADD a/b/0/0exe0.exe
|
||||
PREPARE ADD a/b/0/00/00text1
|
||||
PREPARE ADD a/b/0/00/00text0
|
||||
PREPARE ADD a/b/0/00/00png0.png
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/98/
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/970/
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/971/
|
||||
PREPARE REMOVEDIR a/b/9/97/
|
||||
PREPARE REMOVEFILE a/b/9/96/96text0
|
||||
PREPARE REMOVEFILE a/b/9/96/96text1
|
||||
PREPARE REMOVEDIR a/b/9/96/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/93/
|
||||
PREPARE REMOVEDIR a/b/9/92/
|
||||
PREPARE REMOVEDIR a/b/9/91/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/88/
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/870/
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/871/
|
||||
PREPARE REMOVEDIR a/b/8/87/
|
||||
PREPARE REMOVEFILE a/b/8/86/86text0
|
||||
PREPARE REMOVEFILE a/b/8/86/86text1
|
||||
PREPARE REMOVEDIR a/b/8/86/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/83/
|
||||
PREPARE REMOVEDIR a/b/8/82/
|
||||
PREPARE REMOVEDIR a/b/8/81/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/70/
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/71/
|
||||
PREPARE REMOVEFILE a/b/7/7text0
|
||||
PREPARE REMOVEFILE a/b/7/7text1
|
||||
PREPARE REMOVEDIR a/b/7/
|
||||
PREPARE REMOVEDIR a/b/6/
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5test.exe
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEDIR a/b/5/
|
||||
PREPARE REMOVEFILE a/b/4/4text1
|
||||
PREPARE REMOVEFILE a/b/4/4text0
|
||||
PREPARE REMOVEDIR a/b/4/
|
||||
PREPARE REMOVEFILE a/b/3/3text1
|
||||
PREPARE REMOVEFILE a/b/3/3text0
|
||||
EXECUTE REMOVEFILE precomplete
|
||||
EXECUTE REMOVEFILE a/b/searchplugins/searchpluginstext0
|
||||
EXECUTE REMOVEFILE a/b/searchplugins/searchpluginspng0.png
|
||||
EXECUTE REMOVEFILE a/b/removed-files
|
||||
EXECUTE REMOVEFILE a/b/extensions/extensions1/extensions1png1.png
|
||||
EXECUTE REMOVEFILE a/b/extensions/extensions0/extensions0text0
|
||||
EXECUTE REMOVEFILE a/b/exe0.exe
|
||||
EXECUTE REMOVEFILE a/b/defaults/pref/channel-prefs.js
|
||||
EXECUTE REMOVEFILE a/b/2/20/20text0
|
||||
EXECUTE REMOVEFILE a/b/2/20/20png0.png
|
||||
EXECUTE REMOVEFILE a/b/0/0exe0.exe
|
||||
EXECUTE REMOVEFILE a/b/0/00/00text0
|
||||
EXECUTE REMOVEDIR a/b/searchplugins/
|
||||
EXECUTE REMOVEDIR a/b/extensions/extensions1/
|
||||
EXECUTE REMOVEDIR a/b/extensions/extensions0/
|
||||
EXECUTE REMOVEDIR a/b/extensions/
|
||||
EXECUTE REMOVEDIR a/b/defaults/pref/
|
||||
EXECUTE REMOVEDIR a/b/defaults/
|
||||
EXECUTE REMOVEDIR a/b/2/20/
|
||||
EXECUTE REMOVEDIR a/b/2/
|
||||
EXECUTE REMOVEDIR a/b/0/00/
|
||||
EXECUTE REMOVEDIR a/b/0/
|
||||
EXECUTE REMOVEDIR a/b/
|
||||
EXECUTE REMOVEDIR a/
|
||||
EXECUTE ADD a/b/defaults/pref/channel-prefs.js
|
||||
EXECUTE ADD precomplete
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginstext0
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginspng1.png
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginspng0.png
|
||||
EXECUTE ADD a/b/removed-files
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1text0
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1png1.png
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1png0.png
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0text0
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0png1.png
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0png0.png
|
||||
EXECUTE ADD a/b/exe0.exe
|
||||
EXECUTE ADD a/b/1/10/10text0
|
||||
EXECUTE ADD a/b/0/0exe0.exe
|
||||
EXECUTE ADD a/b/0/00/00text1
|
||||
EXECUTE ADD a/b/0/00/00text0
|
||||
EXECUTE ADD a/b/0/00/00png0.png
|
||||
EXECUTE REMOVEDIR a/b/9/99/
|
||||
EXECUTE REMOVEDIR a/b/9/99/
|
||||
EXECUTE REMOVEDIR a/b/9/98/
|
||||
EXECUTE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
EXECUTE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
EXECUTE REMOVEDIR a/b/9/97/970/
|
||||
EXECUTE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
EXECUTE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
EXECUTE REMOVEDIR a/b/9/97/971/
|
||||
EXECUTE REMOVEDIR a/b/9/97/
|
||||
EXECUTE REMOVEFILE a/b/9/96/96text0
|
||||
EXECUTE REMOVEFILE a/b/9/96/96text1
|
||||
EXECUTE REMOVEDIR a/b/9/96/
|
||||
EXECUTE REMOVEDIR a/b/9/95/
|
||||
EXECUTE REMOVEDIR a/b/9/95/
|
||||
EXECUTE REMOVEDIR a/b/9/94/
|
||||
EXECUTE REMOVEDIR a/b/9/94/
|
||||
EXECUTE REMOVEDIR a/b/9/93/
|
||||
EXECUTE REMOVEDIR a/b/9/92/
|
||||
EXECUTE REMOVEDIR a/b/9/91/
|
||||
EXECUTE REMOVEDIR a/b/9/90/
|
||||
EXECUTE REMOVEDIR a/b/9/90/
|
||||
EXECUTE REMOVEDIR a/b/8/89/
|
||||
EXECUTE REMOVEDIR a/b/8/89/
|
||||
EXECUTE REMOVEDIR a/b/8/88/
|
||||
EXECUTE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
EXECUTE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
EXECUTE REMOVEDIR a/b/8/87/870/
|
||||
EXECUTE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
EXECUTE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
EXECUTE REMOVEDIR a/b/8/87/871/
|
||||
EXECUTE REMOVEDIR a/b/8/87/
|
||||
EXECUTE REMOVEFILE a/b/8/86/86text0
|
||||
EXECUTE REMOVEFILE a/b/8/86/86text1
|
||||
EXECUTE REMOVEDIR a/b/8/86/
|
||||
EXECUTE REMOVEDIR a/b/8/85/
|
||||
EXECUTE REMOVEDIR a/b/8/85/
|
||||
EXECUTE REMOVEDIR a/b/8/84/
|
||||
EXECUTE REMOVEDIR a/b/8/84/
|
||||
EXECUTE REMOVEDIR a/b/8/83/
|
||||
EXECUTE REMOVEDIR a/b/8/82/
|
||||
EXECUTE REMOVEDIR a/b/8/81/
|
||||
EXECUTE REMOVEDIR a/b/8/80/
|
||||
EXECUTE REMOVEDIR a/b/8/80/
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtext0
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtext1
|
||||
EXECUTE REMOVEDIR a/b/7/70/
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtext0
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtext1
|
||||
EXECUTE REMOVEDIR a/b/7/71/
|
||||
EXECUTE REMOVEFILE a/b/7/7text0
|
||||
EXECUTE REMOVEFILE a/b/7/7text1
|
||||
EXECUTE REMOVEDIR a/b/7/
|
||||
EXECUTE REMOVEDIR a/b/6/
|
||||
EXECUTE REMOVEFILE a/b/5/5text1
|
||||
EXECUTE REMOVEFILE a/b/5/5text0
|
||||
EXECUTE REMOVEFILE a/b/5/5test.exe
|
||||
EXECUTE REMOVEFILE a/b/5/5text0
|
||||
file cannot be removed because it does not exist; skipping
|
||||
EXECUTE REMOVEFILE a/b/5/5text1
|
||||
file cannot be removed because it does not exist; skipping
|
||||
EXECUTE REMOVEDIR a/b/5/
|
||||
EXECUTE REMOVEFILE a/b/4/4text1
|
||||
EXECUTE REMOVEFILE a/b/4/4text0
|
||||
EXECUTE REMOVEDIR a/b/4/
|
||||
EXECUTE REMOVEFILE a/b/3/3text1
|
||||
EXECUTE REMOVEFILE a/b/3/3text0
|
||||
FINISH REMOVEFILE precomplete
|
||||
FINISH REMOVEFILE a/b/searchplugins/searchpluginstext0
|
||||
FINISH REMOVEFILE a/b/searchplugins/searchpluginspng0.png
|
||||
FINISH REMOVEFILE a/b/removed-files
|
||||
FINISH REMOVEFILE a/b/extensions/extensions1/extensions1png1.png
|
||||
FINISH REMOVEFILE a/b/extensions/extensions0/extensions0text0
|
||||
FINISH REMOVEFILE a/b/exe0.exe
|
||||
FINISH REMOVEFILE a/b/defaults/pref/channel-prefs.js
|
||||
FINISH REMOVEFILE a/b/2/20/20text0
|
||||
FINISH REMOVEFILE a/b/2/20/20png0.png
|
||||
FINISH REMOVEFILE a/b/0/0exe0.exe
|
||||
FINISH REMOVEFILE a/b/0/00/00text0
|
||||
FINISH REMOVEDIR a/b/searchplugins/
|
||||
non-fatal error removing directory: a/b/searchplugins/, rv: 0
|
||||
FINISH REMOVEDIR a/b/extensions/extensions1/
|
||||
non-fatal error removing directory: a/b/extensions/extensions1/, rv: 0
|
||||
FINISH REMOVEDIR a/b/extensions/extensions0/
|
||||
non-fatal error removing directory: a/b/extensions/extensions0/, rv: 0
|
||||
FINISH REMOVEDIR a/b/extensions/
|
||||
non-fatal error removing directory: a/b/extensions/, rv: 0
|
||||
FINISH REMOVEDIR a/b/defaults/pref/
|
||||
non-fatal error removing directory: a/b/defaults/pref/, rv: 0
|
||||
FINISH REMOVEDIR a/b/defaults/
|
||||
non-fatal error removing directory: a/b/defaults/, rv: 0
|
||||
FINISH REMOVEDIR a/b/2/20/
|
||||
FINISH REMOVEDIR a/b/2/
|
||||
FINISH REMOVEDIR a/b/0/00/
|
||||
non-fatal error removing directory: a/b/0/00/, rv: 0
|
||||
FINISH REMOVEDIR a/b/0/
|
||||
non-fatal error removing directory: a/b/0/, rv: 0
|
||||
FINISH REMOVEDIR a/b/
|
||||
non-fatal error removing directory: a/b/, rv: 0
|
||||
FINISH REMOVEDIR a/
|
||||
non-fatal error removing directory: a/, rv: 0
|
||||
FINISH ADD a/b/defaults/pref/channel-prefs.js
|
||||
FINISH ADD precomplete
|
||||
FINISH ADD a/b/searchplugins/searchpluginstext0
|
||||
FINISH ADD a/b/searchplugins/searchpluginspng1.png
|
||||
FINISH ADD a/b/searchplugins/searchpluginspng0.png
|
||||
FINISH ADD a/b/removed-files
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1text0
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1png1.png
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1png0.png
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0text0
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0png1.png
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0png0.png
|
||||
FINISH ADD a/b/exe0.exe
|
||||
FINISH ADD a/b/1/10/10text0
|
||||
FINISH ADD a/b/0/0exe0.exe
|
||||
FINISH ADD a/b/0/00/00text1
|
||||
FINISH ADD a/b/0/00/00text0
|
||||
FINISH ADD a/b/0/00/00png0.png
|
||||
FINISH REMOVEDIR a/b/9/99/
|
||||
FINISH REMOVEDIR a/b/9/99/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/98/
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext0
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext1
|
||||
FINISH REMOVEDIR a/b/9/97/970/
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext0
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext1
|
||||
FINISH REMOVEDIR a/b/9/97/971/
|
||||
FINISH REMOVEDIR a/b/9/97/
|
||||
FINISH REMOVEFILE a/b/9/96/96text0
|
||||
FINISH REMOVEFILE a/b/9/96/96text1
|
||||
FINISH REMOVEDIR a/b/9/96/
|
||||
FINISH REMOVEDIR a/b/9/95/
|
||||
FINISH REMOVEDIR a/b/9/95/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/94/
|
||||
FINISH REMOVEDIR a/b/9/94/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/93/
|
||||
FINISH REMOVEDIR a/b/9/92/
|
||||
non-fatal error removing directory: a/b/9/92/, rv: 0
|
||||
FINISH REMOVEDIR a/b/9/91/
|
||||
non-fatal error removing directory: a/b/9/91/, rv: 0
|
||||
FINISH REMOVEDIR a/b/9/90/
|
||||
FINISH REMOVEDIR a/b/9/90/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/89/
|
||||
FINISH REMOVEDIR a/b/8/89/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/88/
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext0
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext1
|
||||
FINISH REMOVEDIR a/b/8/87/870/
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext0
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext1
|
||||
FINISH REMOVEDIR a/b/8/87/871/
|
||||
FINISH REMOVEDIR a/b/8/87/
|
||||
FINISH REMOVEFILE a/b/8/86/86text0
|
||||
FINISH REMOVEFILE a/b/8/86/86text1
|
||||
FINISH REMOVEDIR a/b/8/86/
|
||||
FINISH REMOVEDIR a/b/8/85/
|
||||
FINISH REMOVEDIR a/b/8/85/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/84/
|
||||
FINISH REMOVEDIR a/b/8/84/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/83/
|
||||
FINISH REMOVEDIR a/b/8/82/
|
||||
non-fatal error removing directory: a/b/8/82/, rv: 0
|
||||
FINISH REMOVEDIR a/b/8/81/
|
||||
non-fatal error removing directory: a/b/8/81/, rv: 0
|
||||
FINISH REMOVEDIR a/b/8/80/
|
||||
FINISH REMOVEDIR a/b/8/80/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEFILE a/b/7/70/7xtest.exe
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext0
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext1
|
||||
FINISH REMOVEDIR a/b/7/70/
|
||||
FINISH REMOVEFILE a/b/7/71/7xtest.exe
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext0
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext1
|
||||
FINISH REMOVEDIR a/b/7/71/
|
||||
FINISH REMOVEFILE a/b/7/7text0
|
||||
FINISH REMOVEFILE a/b/7/7text1
|
||||
FINISH REMOVEDIR a/b/7/
|
||||
FINISH REMOVEDIR a/b/6/
|
||||
FINISH REMOVEFILE a/b/5/5text1
|
||||
FINISH REMOVEFILE a/b/5/5text0
|
||||
FINISH REMOVEFILE a/b/5/5test.exe
|
||||
FINISH REMOVEDIR a/b/5/
|
||||
FINISH REMOVEFILE a/b/4/4text1
|
||||
FINISH REMOVEFILE a/b/4/4text0
|
||||
FINISH REMOVEDIR a/b/4/
|
||||
FINISH REMOVEFILE a/b/3/3text1
|
||||
FINISH REMOVEFILE a/b/3/3text0
|
||||
succeeded
|
||||
calling QuitProgressUI
|
346
toolkit/mozapps/update/test/unit/data/complete_log_success
Normal file
346
toolkit/mozapps/update/test/unit/data/complete_log_success
Normal file
@ -0,0 +1,346 @@
|
||||
UPDATE TYPE complete
|
||||
PREPARE REMOVEFILE precomplete
|
||||
PREPARE REMOVEFILE a/b/searchplugins/searchpluginstext0
|
||||
PREPARE REMOVEFILE a/b/searchplugins/searchpluginspng0.png
|
||||
PREPARE REMOVEFILE a/b/removed-files
|
||||
PREPARE REMOVEFILE a/b/extensions/extensions1/extensions1png1.png
|
||||
PREPARE REMOVEFILE a/b/extensions/extensions0/extensions0text0
|
||||
PREPARE REMOVEFILE a/b/exe0.exe
|
||||
PREPARE REMOVEFILE a/b/2/20/20text0
|
||||
PREPARE REMOVEFILE a/b/2/20/20png0.png
|
||||
PREPARE REMOVEFILE a/b/0/0exe0.exe
|
||||
PREPARE REMOVEFILE a/b/0/00/00text0
|
||||
PREPARE REMOVEDIR a/b/searchplugins/
|
||||
PREPARE REMOVEDIR a/b/extensions/extensions1/
|
||||
PREPARE REMOVEDIR a/b/extensions/extensions0/
|
||||
PREPARE REMOVEDIR a/b/extensions/
|
||||
PREPARE REMOVEDIR a/b/defaults/pref/
|
||||
PREPARE REMOVEDIR a/b/defaults/
|
||||
PREPARE REMOVEDIR a/b/2/20/
|
||||
PREPARE REMOVEDIR a/b/2/
|
||||
PREPARE REMOVEDIR a/b/0/00/
|
||||
PREPARE REMOVEDIR a/b/0/
|
||||
PREPARE REMOVEDIR a/b/
|
||||
PREPARE REMOVEDIR a/
|
||||
PREPARE ADD precomplete
|
||||
PREPARE ADD a/b/searchplugins/searchpluginstext0
|
||||
PREPARE ADD a/b/searchplugins/searchpluginspng1.png
|
||||
PREPARE ADD a/b/searchplugins/searchpluginspng0.png
|
||||
PREPARE ADD a/b/removed-files
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1text0
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1png1.png
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1png0.png
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0text0
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0png1.png
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0png0.png
|
||||
PREPARE ADD a/b/exe0.exe
|
||||
PREPARE ADD a/b/1/10/10text0
|
||||
PREPARE ADD a/b/0/0exe0.exe
|
||||
PREPARE ADD a/b/0/00/00text1
|
||||
PREPARE ADD a/b/0/00/00text0
|
||||
PREPARE ADD a/b/0/00/00png0.png
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/98/
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/970/
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/971/
|
||||
PREPARE REMOVEDIR a/b/9/97/
|
||||
PREPARE REMOVEFILE a/b/9/96/96text0
|
||||
PREPARE REMOVEFILE a/b/9/96/96text1
|
||||
PREPARE REMOVEDIR a/b/9/96/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/93/
|
||||
PREPARE REMOVEDIR a/b/9/92/
|
||||
PREPARE REMOVEDIR a/b/9/91/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/88/
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/870/
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/871/
|
||||
PREPARE REMOVEDIR a/b/8/87/
|
||||
PREPARE REMOVEFILE a/b/8/86/86text0
|
||||
PREPARE REMOVEFILE a/b/8/86/86text1
|
||||
PREPARE REMOVEDIR a/b/8/86/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/83/
|
||||
PREPARE REMOVEDIR a/b/8/82/
|
||||
PREPARE REMOVEDIR a/b/8/81/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/70/
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/71/
|
||||
PREPARE REMOVEFILE a/b/7/7text0
|
||||
PREPARE REMOVEFILE a/b/7/7text1
|
||||
PREPARE REMOVEDIR a/b/7/
|
||||
PREPARE REMOVEDIR a/b/6/
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5test.exe
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEDIR a/b/5/
|
||||
PREPARE REMOVEFILE a/b/4/4text1
|
||||
PREPARE REMOVEFILE a/b/4/4text0
|
||||
PREPARE REMOVEDIR a/b/4/
|
||||
PREPARE REMOVEFILE a/b/3/3text1
|
||||
PREPARE REMOVEFILE a/b/3/3text0
|
||||
EXECUTE REMOVEFILE precomplete
|
||||
EXECUTE REMOVEFILE a/b/searchplugins/searchpluginstext0
|
||||
EXECUTE REMOVEFILE a/b/searchplugins/searchpluginspng0.png
|
||||
EXECUTE REMOVEFILE a/b/removed-files
|
||||
EXECUTE REMOVEFILE a/b/extensions/extensions1/extensions1png1.png
|
||||
EXECUTE REMOVEFILE a/b/extensions/extensions0/extensions0text0
|
||||
EXECUTE REMOVEFILE a/b/exe0.exe
|
||||
EXECUTE REMOVEFILE a/b/2/20/20text0
|
||||
EXECUTE REMOVEFILE a/b/2/20/20png0.png
|
||||
EXECUTE REMOVEFILE a/b/0/0exe0.exe
|
||||
EXECUTE REMOVEFILE a/b/0/00/00text0
|
||||
EXECUTE REMOVEDIR a/b/searchplugins/
|
||||
EXECUTE REMOVEDIR a/b/extensions/extensions1/
|
||||
EXECUTE REMOVEDIR a/b/extensions/extensions0/
|
||||
EXECUTE REMOVEDIR a/b/extensions/
|
||||
EXECUTE REMOVEDIR a/b/defaults/pref/
|
||||
EXECUTE REMOVEDIR a/b/defaults/
|
||||
EXECUTE REMOVEDIR a/b/2/20/
|
||||
EXECUTE REMOVEDIR a/b/2/
|
||||
EXECUTE REMOVEDIR a/b/0/00/
|
||||
EXECUTE REMOVEDIR a/b/0/
|
||||
EXECUTE REMOVEDIR a/b/
|
||||
EXECUTE REMOVEDIR a/
|
||||
EXECUTE ADD precomplete
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginstext0
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginspng1.png
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginspng0.png
|
||||
EXECUTE ADD a/b/removed-files
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1text0
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1png1.png
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1png0.png
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0text0
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0png1.png
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0png0.png
|
||||
EXECUTE ADD a/b/exe0.exe
|
||||
EXECUTE ADD a/b/1/10/10text0
|
||||
EXECUTE ADD a/b/0/0exe0.exe
|
||||
EXECUTE ADD a/b/0/00/00text1
|
||||
EXECUTE ADD a/b/0/00/00text0
|
||||
EXECUTE ADD a/b/0/00/00png0.png
|
||||
EXECUTE REMOVEDIR a/b/9/99/
|
||||
EXECUTE REMOVEDIR a/b/9/99/
|
||||
EXECUTE REMOVEDIR a/b/9/98/
|
||||
EXECUTE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
EXECUTE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
EXECUTE REMOVEDIR a/b/9/97/970/
|
||||
EXECUTE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
EXECUTE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
EXECUTE REMOVEDIR a/b/9/97/971/
|
||||
EXECUTE REMOVEDIR a/b/9/97/
|
||||
EXECUTE REMOVEFILE a/b/9/96/96text0
|
||||
EXECUTE REMOVEFILE a/b/9/96/96text1
|
||||
EXECUTE REMOVEDIR a/b/9/96/
|
||||
EXECUTE REMOVEDIR a/b/9/95/
|
||||
EXECUTE REMOVEDIR a/b/9/95/
|
||||
EXECUTE REMOVEDIR a/b/9/94/
|
||||
EXECUTE REMOVEDIR a/b/9/94/
|
||||
EXECUTE REMOVEDIR a/b/9/93/
|
||||
EXECUTE REMOVEDIR a/b/9/92/
|
||||
EXECUTE REMOVEDIR a/b/9/91/
|
||||
EXECUTE REMOVEDIR a/b/9/90/
|
||||
EXECUTE REMOVEDIR a/b/9/90/
|
||||
EXECUTE REMOVEDIR a/b/8/89/
|
||||
EXECUTE REMOVEDIR a/b/8/89/
|
||||
EXECUTE REMOVEDIR a/b/8/88/
|
||||
EXECUTE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
EXECUTE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
EXECUTE REMOVEDIR a/b/8/87/870/
|
||||
EXECUTE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
EXECUTE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
EXECUTE REMOVEDIR a/b/8/87/871/
|
||||
EXECUTE REMOVEDIR a/b/8/87/
|
||||
EXECUTE REMOVEFILE a/b/8/86/86text0
|
||||
EXECUTE REMOVEFILE a/b/8/86/86text1
|
||||
EXECUTE REMOVEDIR a/b/8/86/
|
||||
EXECUTE REMOVEDIR a/b/8/85/
|
||||
EXECUTE REMOVEDIR a/b/8/85/
|
||||
EXECUTE REMOVEDIR a/b/8/84/
|
||||
EXECUTE REMOVEDIR a/b/8/84/
|
||||
EXECUTE REMOVEDIR a/b/8/83/
|
||||
EXECUTE REMOVEDIR a/b/8/82/
|
||||
EXECUTE REMOVEDIR a/b/8/81/
|
||||
EXECUTE REMOVEDIR a/b/8/80/
|
||||
EXECUTE REMOVEDIR a/b/8/80/
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtext0
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtext1
|
||||
EXECUTE REMOVEDIR a/b/7/70/
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtext0
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtext1
|
||||
EXECUTE REMOVEDIR a/b/7/71/
|
||||
EXECUTE REMOVEFILE a/b/7/7text0
|
||||
EXECUTE REMOVEFILE a/b/7/7text1
|
||||
EXECUTE REMOVEDIR a/b/7/
|
||||
EXECUTE REMOVEDIR a/b/6/
|
||||
EXECUTE REMOVEFILE a/b/5/5text1
|
||||
EXECUTE REMOVEFILE a/b/5/5text0
|
||||
EXECUTE REMOVEFILE a/b/5/5test.exe
|
||||
EXECUTE REMOVEFILE a/b/5/5text0
|
||||
file cannot be removed because it does not exist; skipping
|
||||
EXECUTE REMOVEFILE a/b/5/5text1
|
||||
file cannot be removed because it does not exist; skipping
|
||||
EXECUTE REMOVEDIR a/b/5/
|
||||
EXECUTE REMOVEFILE a/b/4/4text1
|
||||
EXECUTE REMOVEFILE a/b/4/4text0
|
||||
EXECUTE REMOVEDIR a/b/4/
|
||||
EXECUTE REMOVEFILE a/b/3/3text1
|
||||
EXECUTE REMOVEFILE a/b/3/3text0
|
||||
FINISH REMOVEFILE precomplete
|
||||
FINISH REMOVEFILE a/b/searchplugins/searchpluginstext0
|
||||
FINISH REMOVEFILE a/b/searchplugins/searchpluginspng0.png
|
||||
FINISH REMOVEFILE a/b/removed-files
|
||||
FINISH REMOVEFILE a/b/extensions/extensions1/extensions1png1.png
|
||||
FINISH REMOVEFILE a/b/extensions/extensions0/extensions0text0
|
||||
FINISH REMOVEFILE a/b/exe0.exe
|
||||
FINISH REMOVEFILE a/b/2/20/20text0
|
||||
FINISH REMOVEFILE a/b/2/20/20png0.png
|
||||
FINISH REMOVEFILE a/b/0/0exe0.exe
|
||||
FINISH REMOVEFILE a/b/0/00/00text0
|
||||
FINISH REMOVEDIR a/b/searchplugins/
|
||||
non-fatal error removing directory: a/b/searchplugins/, rv: 0
|
||||
FINISH REMOVEDIR a/b/extensions/extensions1/
|
||||
non-fatal error removing directory: a/b/extensions/extensions1/, rv: 0
|
||||
FINISH REMOVEDIR a/b/extensions/extensions0/
|
||||
non-fatal error removing directory: a/b/extensions/extensions0/, rv: 0
|
||||
FINISH REMOVEDIR a/b/extensions/
|
||||
non-fatal error removing directory: a/b/extensions/, rv: 0
|
||||
FINISH REMOVEDIR a/b/defaults/pref/
|
||||
non-fatal error removing directory: a/b/defaults/pref/, rv: 0
|
||||
FINISH REMOVEDIR a/b/defaults/
|
||||
non-fatal error removing directory: a/b/defaults/, rv: 0
|
||||
FINISH REMOVEDIR a/b/2/20/
|
||||
FINISH REMOVEDIR a/b/2/
|
||||
FINISH REMOVEDIR a/b/0/00/
|
||||
non-fatal error removing directory: a/b/0/00/, rv: 0
|
||||
FINISH REMOVEDIR a/b/0/
|
||||
non-fatal error removing directory: a/b/0/, rv: 0
|
||||
FINISH REMOVEDIR a/b/
|
||||
non-fatal error removing directory: a/b/, rv: 0
|
||||
FINISH REMOVEDIR a/
|
||||
non-fatal error removing directory: a/, rv: 0
|
||||
FINISH ADD precomplete
|
||||
FINISH ADD a/b/searchplugins/searchpluginstext0
|
||||
FINISH ADD a/b/searchplugins/searchpluginspng1.png
|
||||
FINISH ADD a/b/searchplugins/searchpluginspng0.png
|
||||
FINISH ADD a/b/removed-files
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1text0
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1png1.png
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1png0.png
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0text0
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0png1.png
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0png0.png
|
||||
FINISH ADD a/b/exe0.exe
|
||||
FINISH ADD a/b/1/10/10text0
|
||||
FINISH ADD a/b/0/0exe0.exe
|
||||
FINISH ADD a/b/0/00/00text1
|
||||
FINISH ADD a/b/0/00/00text0
|
||||
FINISH ADD a/b/0/00/00png0.png
|
||||
FINISH REMOVEDIR a/b/9/99/
|
||||
FINISH REMOVEDIR a/b/9/99/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/98/
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext0
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext1
|
||||
FINISH REMOVEDIR a/b/9/97/970/
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext0
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext1
|
||||
FINISH REMOVEDIR a/b/9/97/971/
|
||||
FINISH REMOVEDIR a/b/9/97/
|
||||
FINISH REMOVEFILE a/b/9/96/96text0
|
||||
FINISH REMOVEFILE a/b/9/96/96text1
|
||||
FINISH REMOVEDIR a/b/9/96/
|
||||
FINISH REMOVEDIR a/b/9/95/
|
||||
FINISH REMOVEDIR a/b/9/95/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/94/
|
||||
FINISH REMOVEDIR a/b/9/94/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/93/
|
||||
FINISH REMOVEDIR a/b/9/92/
|
||||
non-fatal error removing directory: a/b/9/92/, rv: 0
|
||||
FINISH REMOVEDIR a/b/9/91/
|
||||
non-fatal error removing directory: a/b/9/91/, rv: 0
|
||||
FINISH REMOVEDIR a/b/9/90/
|
||||
FINISH REMOVEDIR a/b/9/90/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/89/
|
||||
FINISH REMOVEDIR a/b/8/89/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/88/
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext0
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext1
|
||||
FINISH REMOVEDIR a/b/8/87/870/
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext0
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext1
|
||||
FINISH REMOVEDIR a/b/8/87/871/
|
||||
FINISH REMOVEDIR a/b/8/87/
|
||||
FINISH REMOVEFILE a/b/8/86/86text0
|
||||
FINISH REMOVEFILE a/b/8/86/86text1
|
||||
FINISH REMOVEDIR a/b/8/86/
|
||||
FINISH REMOVEDIR a/b/8/85/
|
||||
FINISH REMOVEDIR a/b/8/85/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/84/
|
||||
FINISH REMOVEDIR a/b/8/84/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/83/
|
||||
FINISH REMOVEDIR a/b/8/82/
|
||||
non-fatal error removing directory: a/b/8/82/, rv: 0
|
||||
FINISH REMOVEDIR a/b/8/81/
|
||||
non-fatal error removing directory: a/b/8/81/, rv: 0
|
||||
FINISH REMOVEDIR a/b/8/80/
|
||||
FINISH REMOVEDIR a/b/8/80/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEFILE a/b/7/70/7xtest.exe
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext0
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext1
|
||||
FINISH REMOVEDIR a/b/7/70/
|
||||
FINISH REMOVEFILE a/b/7/71/7xtest.exe
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext0
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext1
|
||||
FINISH REMOVEDIR a/b/7/71/
|
||||
FINISH REMOVEFILE a/b/7/7text0
|
||||
FINISH REMOVEFILE a/b/7/7text1
|
||||
FINISH REMOVEDIR a/b/7/
|
||||
FINISH REMOVEDIR a/b/6/
|
||||
FINISH REMOVEFILE a/b/5/5text1
|
||||
FINISH REMOVEFILE a/b/5/5text0
|
||||
FINISH REMOVEFILE a/b/5/5test.exe
|
||||
FINISH REMOVEDIR a/b/5/
|
||||
FINISH REMOVEFILE a/b/4/4text1
|
||||
FINISH REMOVEFILE a/b/4/4text0
|
||||
FINISH REMOVEDIR a/b/4/
|
||||
FINISH REMOVEFILE a/b/3/3text1
|
||||
FINISH REMOVEFILE a/b/3/3text0
|
||||
succeeded
|
||||
calling QuitProgressUI
|
30
toolkit/mozapps/update/test/unit/data/complete_precomplete
Normal file
30
toolkit/mozapps/update/test/unit/data/complete_precomplete
Normal file
@ -0,0 +1,30 @@
|
||||
remove "precomplete"
|
||||
remove "a/b/searchplugins/searchpluginstext0"
|
||||
remove "a/b/searchplugins/searchpluginspng1.png"
|
||||
remove "a/b/searchplugins/searchpluginspng0.png"
|
||||
remove "a/b/removed-files"
|
||||
remove "a/b/extensions/extensions1/extensions1text0"
|
||||
remove "a/b/extensions/extensions1/extensions1png1.png"
|
||||
remove "a/b/extensions/extensions1/extensions1png0.png"
|
||||
remove "a/b/extensions/extensions0/extensions0text0"
|
||||
remove "a/b/extensions/extensions0/extensions0png1.png"
|
||||
remove "a/b/extensions/extensions0/extensions0png0.png"
|
||||
remove "a/b/exe0.exe"
|
||||
remove-cc "a/b/defaults/pref/channel-prefs.js"
|
||||
remove "a/b/1/10/10text0"
|
||||
remove "a/b/0/0exe0.exe"
|
||||
remove "a/b/0/00/00text1"
|
||||
remove "a/b/0/00/00text0"
|
||||
remove "a/b/0/00/00png0.png"
|
||||
rmdir "a/b/searchplugins/"
|
||||
rmdir "a/b/extensions/extensions1/"
|
||||
rmdir "a/b/extensions/extensions0/"
|
||||
rmdir "a/b/extensions/"
|
||||
rmdir "a/b/defaults/pref/"
|
||||
rmdir "a/b/defaults/"
|
||||
rmdir "a/b/1/10/"
|
||||
rmdir "a/b/1/"
|
||||
rmdir "a/b/0/00/"
|
||||
rmdir "a/b/0/"
|
||||
rmdir "a/b/"
|
||||
rmdir "a/"
|
41
toolkit/mozapps/update/test/unit/data/complete_removed-files
Normal file
41
toolkit/mozapps/update/test/unit/data/complete_removed-files
Normal file
@ -0,0 +1,41 @@
|
||||
a/b/text0
|
||||
a/b/text1
|
||||
a/b/3/3text0
|
||||
a/b/3/3text1
|
||||
a/b/4/exe0.exe
|
||||
a/b/4/4text0
|
||||
a/b/4/4text1
|
||||
a/b/4/
|
||||
a/b/5/5text0
|
||||
a/b/5/5text1
|
||||
a/b/5/*
|
||||
a/b/6/
|
||||
a/b/7/*
|
||||
a/b/8/80/
|
||||
a/b/8/81/
|
||||
a/b/8/82/
|
||||
a/b/8/83/
|
||||
a/b/8/84/
|
||||
a/b/8/85/*
|
||||
a/b/8/86/*
|
||||
a/b/8/87/*
|
||||
a/b/8/88/*
|
||||
a/b/8/89/*
|
||||
a/b/8/80/
|
||||
a/b/8/84/*
|
||||
a/b/8/85/*
|
||||
a/b/8/89/
|
||||
a/b/9/90/
|
||||
a/b/9/91/
|
||||
a/b/9/92/
|
||||
a/b/9/93/
|
||||
a/b/9/94/
|
||||
a/b/9/95/*
|
||||
a/b/9/96/*
|
||||
a/b/9/97/*
|
||||
a/b/9/98/*
|
||||
a/b/9/99/*
|
||||
a/b/9/90/
|
||||
a/b/9/94/*
|
||||
a/b/9/95/*
|
||||
a/b/9/99/
|
@ -0,0 +1,60 @@
|
||||
type "complete"
|
||||
add-cc "a/b/defaults/pref/channel-prefs.js"
|
||||
add "precomplete"
|
||||
add "a/b/searchplugins/searchpluginstext0"
|
||||
add "a/b/searchplugins/searchpluginspng1.png"
|
||||
add "a/b/searchplugins/searchpluginspng0.png"
|
||||
add "a/b/removed-files"
|
||||
add-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1text0"
|
||||
add-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png1.png"
|
||||
add-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png0.png"
|
||||
add-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0text0"
|
||||
add-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png1.png"
|
||||
add-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png0.png"
|
||||
add "a/b/exe0.exe"
|
||||
add "a/b/1/10/10text0"
|
||||
add "a/b/0/0exe0.exe"
|
||||
add "a/b/0/00/00text1"
|
||||
add "a/b/0/00/00text0"
|
||||
add "a/b/0/00/00png0.png"
|
||||
remove "a/b/text1"
|
||||
remove "a/b/text0"
|
||||
rmrfdir "a/b/9/99/"
|
||||
rmdir "a/b/9/99/"
|
||||
rmrfdir "a/b/9/98/"
|
||||
rmrfdir "a/b/9/97/"
|
||||
rmrfdir "a/b/9/96/"
|
||||
rmrfdir "a/b/9/95/"
|
||||
rmrfdir "a/b/9/95/"
|
||||
rmrfdir "a/b/9/94/"
|
||||
rmdir "a/b/9/94/"
|
||||
rmdir "a/b/9/93/"
|
||||
rmdir "a/b/9/92/"
|
||||
rmdir "a/b/9/91/"
|
||||
rmdir "a/b/9/90/"
|
||||
rmdir "a/b/9/90/"
|
||||
rmrfdir "a/b/8/89/"
|
||||
rmdir "a/b/8/89/"
|
||||
rmrfdir "a/b/8/88/"
|
||||
rmrfdir "a/b/8/87/"
|
||||
rmrfdir "a/b/8/86/"
|
||||
rmrfdir "a/b/8/85/"
|
||||
rmrfdir "a/b/8/85/"
|
||||
rmrfdir "a/b/8/84/"
|
||||
rmdir "a/b/8/84/"
|
||||
rmdir "a/b/8/83/"
|
||||
rmdir "a/b/8/82/"
|
||||
rmdir "a/b/8/81/"
|
||||
rmdir "a/b/8/80/"
|
||||
rmdir "a/b/8/80/"
|
||||
rmrfdir "a/b/7/"
|
||||
rmdir "a/b/6/"
|
||||
remove "a/b/5/5text1"
|
||||
remove "a/b/5/5text0"
|
||||
rmrfdir "a/b/5/"
|
||||
remove "a/b/4/exe0.exe"
|
||||
remove "a/b/4/4text1"
|
||||
remove "a/b/4/4text0"
|
||||
rmdir "a/b/4/"
|
||||
remove "a/b/3/3text1"
|
||||
remove "a/b/3/3text0"
|
194
toolkit/mozapps/update/test/unit/data/partial_log_failure
Normal file
194
toolkit/mozapps/update/test/unit/data/partial_log_failure
Normal file
@ -0,0 +1,194 @@
|
||||
DoUpdate: changing update channel
|
||||
UPDATE TYPE partial
|
||||
DoUpdate: unable to change channel with a partial update
|
||||
PREPARE ADD precomplete
|
||||
PREPARE ADD a/b/searchplugins/searchpluginstext0
|
||||
PREPARE PATCH a/b/searchplugins/searchpluginspng1.png
|
||||
PREPARE PATCH a/b/searchplugins/searchpluginspng0.png
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1text0
|
||||
PREPARE PATCH a/b/extensions/extensions1/extensions1png1.png
|
||||
PREPARE PATCH a/b/extensions/extensions1/extensions1png0.png
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0text0
|
||||
PREPARE PATCH a/b/extensions/extensions0/extensions0png1.png
|
||||
PREPARE PATCH a/b/extensions/extensions0/extensions0png0.png
|
||||
PREPARE PATCH a/b/exe0.exe
|
||||
PREPARE PATCH a/b/0/0exe0.exe
|
||||
PREPARE ADD a/b/0/00/00text0
|
||||
PREPARE PATCH a/b/0/00/00png0.png
|
||||
PREPARE ADD a/b/2/20/20text0
|
||||
PREPARE ADD a/b/2/20/20png0.png
|
||||
PREPARE ADD a/b/0/00/00text2
|
||||
PREPARE REMOVEFILE a/b/1/10/10text0
|
||||
PREPARE REMOVEFILE a/b/0/00/00text1
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/98/
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/970/
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/971/
|
||||
PREPARE REMOVEDIR a/b/9/97/
|
||||
PREPARE REMOVEFILE a/b/9/96/96text0
|
||||
PREPARE REMOVEFILE a/b/9/96/96text1
|
||||
PREPARE REMOVEDIR a/b/9/96/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/93/
|
||||
PREPARE REMOVEDIR a/b/9/92/
|
||||
PREPARE REMOVEDIR a/b/9/91/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/88/
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/870/
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/871/
|
||||
PREPARE REMOVEDIR a/b/8/87/
|
||||
PREPARE REMOVEFILE a/b/8/86/86text0
|
||||
PREPARE REMOVEFILE a/b/8/86/86text1
|
||||
PREPARE REMOVEDIR a/b/8/86/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/83/
|
||||
PREPARE REMOVEDIR a/b/8/82/
|
||||
PREPARE REMOVEDIR a/b/8/81/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/70/
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/71/
|
||||
PREPARE REMOVEFILE a/b/7/7text0
|
||||
PREPARE REMOVEFILE a/b/7/7text1
|
||||
PREPARE REMOVEDIR a/b/7/
|
||||
PREPARE REMOVEDIR a/b/6/
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5test.exe
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEDIR a/b/5/
|
||||
PREPARE REMOVEFILE a/b/4/4text1
|
||||
PREPARE REMOVEFILE a/b/4/4text0
|
||||
PREPARE REMOVEDIR a/b/4/
|
||||
PREPARE REMOVEFILE a/b/3/3text1
|
||||
PREPARE REMOVEFILE a/b/3/3text0
|
||||
PREPARE REMOVEDIR a/b/1/10/
|
||||
PREPARE REMOVEDIR a/b/1/
|
||||
EXECUTE ADD precomplete
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginstext0
|
||||
EXECUTE PATCH a/b/searchplugins/searchpluginspng1.png
|
||||
EXECUTE PATCH a/b/searchplugins/searchpluginspng0.png
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1text0
|
||||
EXECUTE PATCH a/b/extensions/extensions1/extensions1png1.png
|
||||
EXECUTE PATCH a/b/extensions/extensions1/extensions1png0.png
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0text0
|
||||
EXECUTE PATCH a/b/extensions/extensions0/extensions0png1.png
|
||||
EXECUTE PATCH a/b/extensions/extensions0/extensions0png0.png
|
||||
EXECUTE PATCH a/b/exe0.exe
|
||||
EXECUTE PATCH a/b/0/0exe0.exe
|
||||
LoadSourceFile: destination file size 776 does not match expected size 878
|
||||
LoadSourceFile failed
|
||||
### execution failed
|
||||
FINISH ADD precomplete
|
||||
FINISH ADD a/b/searchplugins/searchpluginstext0
|
||||
FINISH PATCH a/b/searchplugins/searchpluginspng1.png
|
||||
FINISH PATCH a/b/searchplugins/searchpluginspng0.png
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1text0
|
||||
backup_restore: backup file doesn't exist: a/b/extensions/extensions1/extensions1text0.moz-backup
|
||||
FINISH PATCH a/b/extensions/extensions1/extensions1png1.png
|
||||
FINISH PATCH a/b/extensions/extensions1/extensions1png0.png
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0text0
|
||||
FINISH PATCH a/b/extensions/extensions0/extensions0png1.png
|
||||
FINISH PATCH a/b/extensions/extensions0/extensions0png0.png
|
||||
FINISH PATCH a/b/exe0.exe
|
||||
FINISH PATCH a/b/0/0exe0.exe
|
||||
backup_restore: backup file doesn't exist: a/b/0/0exe0.exe.moz-backup
|
||||
FINISH ADD a/b/0/00/00text0
|
||||
backup_restore: backup file doesn't exist: a/b/0/00/00text0.moz-backup
|
||||
FINISH PATCH a/b/0/00/00png0.png
|
||||
backup_restore: backup file doesn't exist: a/b/0/00/00png0.png.moz-backup
|
||||
FINISH ADD a/b/2/20/20text0
|
||||
backup_restore: backup file doesn't exist: a/b/2/20/20text0.moz-backup
|
||||
FINISH ADD a/b/2/20/20png0.png
|
||||
backup_restore: backup file doesn't exist: a/b/2/20/20png0.png.moz-backup
|
||||
FINISH ADD a/b/0/00/00text2
|
||||
backup_restore: backup file doesn't exist: a/b/0/00/00text2.moz-backup
|
||||
FINISH REMOVEFILE a/b/1/10/10text0
|
||||
backup_restore: backup file doesn't exist: a/b/1/10/10text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/0/00/00text1
|
||||
backup_restore: backup file doesn't exist: a/b/0/00/00text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext0
|
||||
backup_restore: backup file doesn't exist: a/b/9/97/970/97xtext0.moz-backup
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext1
|
||||
backup_restore: backup file doesn't exist: a/b/9/97/970/97xtext1.moz-backup
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext0
|
||||
backup_restore: backup file doesn't exist: a/b/9/97/971/97xtext0.moz-backup
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext1
|
||||
backup_restore: backup file doesn't exist: a/b/9/97/971/97xtext1.moz-backup
|
||||
FINISH REMOVEFILE a/b/9/96/96text0
|
||||
backup_restore: backup file doesn't exist: a/b/9/96/96text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/9/96/96text1
|
||||
backup_restore: backup file doesn't exist: a/b/9/96/96text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext0
|
||||
backup_restore: backup file doesn't exist: a/b/8/87/870/87xtext0.moz-backup
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext1
|
||||
backup_restore: backup file doesn't exist: a/b/8/87/870/87xtext1.moz-backup
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext0
|
||||
backup_restore: backup file doesn't exist: a/b/8/87/871/87xtext0.moz-backup
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext1
|
||||
backup_restore: backup file doesn't exist: a/b/8/87/871/87xtext1.moz-backup
|
||||
FINISH REMOVEFILE a/b/8/86/86text0
|
||||
backup_restore: backup file doesn't exist: a/b/8/86/86text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/8/86/86text1
|
||||
backup_restore: backup file doesn't exist: a/b/8/86/86text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/70/7xtest.exe
|
||||
backup_restore: backup file doesn't exist: a/b/7/70/7xtest.exe.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext0
|
||||
backup_restore: backup file doesn't exist: a/b/7/70/7xtext0.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext1
|
||||
backup_restore: backup file doesn't exist: a/b/7/70/7xtext1.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/71/7xtest.exe
|
||||
backup_restore: backup file doesn't exist: a/b/7/71/7xtest.exe.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext0
|
||||
backup_restore: backup file doesn't exist: a/b/7/71/7xtext0.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext1
|
||||
backup_restore: backup file doesn't exist: a/b/7/71/7xtext1.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/7text0
|
||||
backup_restore: backup file doesn't exist: a/b/7/7text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/7/7text1
|
||||
backup_restore: backup file doesn't exist: a/b/7/7text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/5/5text1
|
||||
backup_restore: backup file doesn't exist: a/b/5/5text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/5/5text0
|
||||
backup_restore: backup file doesn't exist: a/b/5/5text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/5/5test.exe
|
||||
backup_restore: backup file doesn't exist: a/b/5/5test.exe.moz-backup
|
||||
FINISH REMOVEFILE a/b/5/5text0
|
||||
backup_restore: backup file doesn't exist: a/b/5/5text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/5/5text1
|
||||
backup_restore: backup file doesn't exist: a/b/5/5text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/4/4text1
|
||||
backup_restore: backup file doesn't exist: a/b/4/4text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/4/4text0
|
||||
backup_restore: backup file doesn't exist: a/b/4/4text0.moz-backup
|
||||
FINISH REMOVEFILE a/b/3/3text1
|
||||
backup_restore: backup file doesn't exist: a/b/3/3text1.moz-backup
|
||||
FINISH REMOVEFILE a/b/3/3text0
|
||||
backup_restore: backup file doesn't exist: a/b/3/3text0.moz-backup
|
||||
failed: 8
|
||||
calling QuitProgressUI
|
281
toolkit/mozapps/update/test/unit/data/partial_log_success
Normal file
281
toolkit/mozapps/update/test/unit/data/partial_log_success
Normal file
@ -0,0 +1,281 @@
|
||||
DoUpdate: changing update channel
|
||||
UPDATE TYPE partial
|
||||
DoUpdate: unable to change channel with a partial update
|
||||
PREPARE ADD precomplete
|
||||
PREPARE ADD a/b/searchplugins/searchpluginstext0
|
||||
PREPARE PATCH a/b/searchplugins/searchpluginspng1.png
|
||||
PREPARE PATCH a/b/searchplugins/searchpluginspng0.png
|
||||
PREPARE ADD a/b/extensions/extensions1/extensions1text0
|
||||
PREPARE PATCH a/b/extensions/extensions1/extensions1png1.png
|
||||
PREPARE PATCH a/b/extensions/extensions1/extensions1png0.png
|
||||
PREPARE ADD a/b/extensions/extensions0/extensions0text0
|
||||
PREPARE PATCH a/b/extensions/extensions0/extensions0png1.png
|
||||
PREPARE PATCH a/b/extensions/extensions0/extensions0png0.png
|
||||
PREPARE PATCH a/b/exe0.exe
|
||||
PREPARE PATCH a/b/0/0exe0.exe
|
||||
PREPARE ADD a/b/0/00/00text0
|
||||
PREPARE PATCH a/b/0/00/00png0.png
|
||||
PREPARE ADD a/b/2/20/20text0
|
||||
PREPARE ADD a/b/2/20/20png0.png
|
||||
PREPARE ADD a/b/0/00/00text2
|
||||
PREPARE REMOVEFILE a/b/1/10/10text0
|
||||
PREPARE REMOVEFILE a/b/0/00/00text1
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/99/
|
||||
PREPARE REMOVEDIR a/b/9/98/
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/970/
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
PREPARE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
PREPARE REMOVEDIR a/b/9/97/971/
|
||||
PREPARE REMOVEDIR a/b/9/97/
|
||||
PREPARE REMOVEFILE a/b/9/96/96text0
|
||||
PREPARE REMOVEFILE a/b/9/96/96text1
|
||||
PREPARE REMOVEDIR a/b/9/96/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/95/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/94/
|
||||
PREPARE REMOVEDIR a/b/9/93/
|
||||
PREPARE REMOVEDIR a/b/9/92/
|
||||
PREPARE REMOVEDIR a/b/9/91/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/9/90/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/89/
|
||||
PREPARE REMOVEDIR a/b/8/88/
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/870/
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
PREPARE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
PREPARE REMOVEDIR a/b/8/87/871/
|
||||
PREPARE REMOVEDIR a/b/8/87/
|
||||
PREPARE REMOVEFILE a/b/8/86/86text0
|
||||
PREPARE REMOVEFILE a/b/8/86/86text1
|
||||
PREPARE REMOVEDIR a/b/8/86/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/85/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/84/
|
||||
PREPARE REMOVEDIR a/b/8/83/
|
||||
PREPARE REMOVEDIR a/b/8/82/
|
||||
PREPARE REMOVEDIR a/b/8/81/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEDIR a/b/8/80/
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/70/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/70/
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext0
|
||||
PREPARE REMOVEFILE a/b/7/71/7xtext1
|
||||
PREPARE REMOVEDIR a/b/7/71/
|
||||
PREPARE REMOVEFILE a/b/7/7text0
|
||||
PREPARE REMOVEFILE a/b/7/7text1
|
||||
PREPARE REMOVEDIR a/b/7/
|
||||
PREPARE REMOVEDIR a/b/6/
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5test.exe
|
||||
PREPARE REMOVEFILE a/b/5/5text0
|
||||
PREPARE REMOVEFILE a/b/5/5text1
|
||||
PREPARE REMOVEDIR a/b/5/
|
||||
PREPARE REMOVEFILE a/b/4/4text1
|
||||
PREPARE REMOVEFILE a/b/4/4text0
|
||||
PREPARE REMOVEDIR a/b/4/
|
||||
PREPARE REMOVEFILE a/b/3/3text1
|
||||
PREPARE REMOVEFILE a/b/3/3text0
|
||||
PREPARE REMOVEDIR a/b/1/10/
|
||||
PREPARE REMOVEDIR a/b/1/
|
||||
EXECUTE ADD precomplete
|
||||
EXECUTE ADD a/b/searchplugins/searchpluginstext0
|
||||
EXECUTE PATCH a/b/searchplugins/searchpluginspng1.png
|
||||
EXECUTE PATCH a/b/searchplugins/searchpluginspng0.png
|
||||
EXECUTE ADD a/b/extensions/extensions1/extensions1text0
|
||||
EXECUTE PATCH a/b/extensions/extensions1/extensions1png1.png
|
||||
EXECUTE PATCH a/b/extensions/extensions1/extensions1png0.png
|
||||
EXECUTE ADD a/b/extensions/extensions0/extensions0text0
|
||||
EXECUTE PATCH a/b/extensions/extensions0/extensions0png1.png
|
||||
EXECUTE PATCH a/b/extensions/extensions0/extensions0png0.png
|
||||
EXECUTE PATCH a/b/exe0.exe
|
||||
EXECUTE PATCH a/b/0/0exe0.exe
|
||||
EXECUTE ADD a/b/0/00/00text0
|
||||
EXECUTE PATCH a/b/0/00/00png0.png
|
||||
EXECUTE ADD a/b/2/20/20text0
|
||||
EXECUTE ADD a/b/2/20/20png0.png
|
||||
EXECUTE ADD a/b/0/00/00text2
|
||||
EXECUTE REMOVEFILE a/b/1/10/10text0
|
||||
EXECUTE REMOVEFILE a/b/0/00/00text1
|
||||
EXECUTE REMOVEDIR a/b/9/99/
|
||||
EXECUTE REMOVEDIR a/b/9/99/
|
||||
EXECUTE REMOVEDIR a/b/9/98/
|
||||
EXECUTE REMOVEFILE a/b/9/97/970/97xtext0
|
||||
EXECUTE REMOVEFILE a/b/9/97/970/97xtext1
|
||||
EXECUTE REMOVEDIR a/b/9/97/970/
|
||||
EXECUTE REMOVEFILE a/b/9/97/971/97xtext0
|
||||
EXECUTE REMOVEFILE a/b/9/97/971/97xtext1
|
||||
EXECUTE REMOVEDIR a/b/9/97/971/
|
||||
EXECUTE REMOVEDIR a/b/9/97/
|
||||
EXECUTE REMOVEFILE a/b/9/96/96text0
|
||||
EXECUTE REMOVEFILE a/b/9/96/96text1
|
||||
EXECUTE REMOVEDIR a/b/9/96/
|
||||
EXECUTE REMOVEDIR a/b/9/95/
|
||||
EXECUTE REMOVEDIR a/b/9/95/
|
||||
EXECUTE REMOVEDIR a/b/9/94/
|
||||
EXECUTE REMOVEDIR a/b/9/94/
|
||||
EXECUTE REMOVEDIR a/b/9/93/
|
||||
EXECUTE REMOVEDIR a/b/9/92/
|
||||
EXECUTE REMOVEDIR a/b/9/91/
|
||||
EXECUTE REMOVEDIR a/b/9/90/
|
||||
EXECUTE REMOVEDIR a/b/9/90/
|
||||
EXECUTE REMOVEDIR a/b/8/89/
|
||||
EXECUTE REMOVEDIR a/b/8/89/
|
||||
EXECUTE REMOVEDIR a/b/8/88/
|
||||
EXECUTE REMOVEFILE a/b/8/87/870/87xtext0
|
||||
EXECUTE REMOVEFILE a/b/8/87/870/87xtext1
|
||||
EXECUTE REMOVEDIR a/b/8/87/870/
|
||||
EXECUTE REMOVEFILE a/b/8/87/871/87xtext0
|
||||
EXECUTE REMOVEFILE a/b/8/87/871/87xtext1
|
||||
EXECUTE REMOVEDIR a/b/8/87/871/
|
||||
EXECUTE REMOVEDIR a/b/8/87/
|
||||
EXECUTE REMOVEFILE a/b/8/86/86text0
|
||||
EXECUTE REMOVEFILE a/b/8/86/86text1
|
||||
EXECUTE REMOVEDIR a/b/8/86/
|
||||
EXECUTE REMOVEDIR a/b/8/85/
|
||||
EXECUTE REMOVEDIR a/b/8/85/
|
||||
EXECUTE REMOVEDIR a/b/8/84/
|
||||
EXECUTE REMOVEDIR a/b/8/84/
|
||||
EXECUTE REMOVEDIR a/b/8/83/
|
||||
EXECUTE REMOVEDIR a/b/8/82/
|
||||
EXECUTE REMOVEDIR a/b/8/81/
|
||||
EXECUTE REMOVEDIR a/b/8/80/
|
||||
EXECUTE REMOVEDIR a/b/8/80/
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtest.exe
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtext0
|
||||
EXECUTE REMOVEFILE a/b/7/70/7xtext1
|
||||
EXECUTE REMOVEDIR a/b/7/70/
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtest.exe
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtext0
|
||||
EXECUTE REMOVEFILE a/b/7/71/7xtext1
|
||||
EXECUTE REMOVEDIR a/b/7/71/
|
||||
EXECUTE REMOVEFILE a/b/7/7text0
|
||||
EXECUTE REMOVEFILE a/b/7/7text1
|
||||
EXECUTE REMOVEDIR a/b/7/
|
||||
EXECUTE REMOVEDIR a/b/6/
|
||||
EXECUTE REMOVEFILE a/b/5/5text1
|
||||
EXECUTE REMOVEFILE a/b/5/5text0
|
||||
EXECUTE REMOVEFILE a/b/5/5test.exe
|
||||
EXECUTE REMOVEFILE a/b/5/5text0
|
||||
file cannot be removed because it does not exist; skipping
|
||||
EXECUTE REMOVEFILE a/b/5/5text1
|
||||
file cannot be removed because it does not exist; skipping
|
||||
EXECUTE REMOVEDIR a/b/5/
|
||||
EXECUTE REMOVEFILE a/b/4/4text1
|
||||
EXECUTE REMOVEFILE a/b/4/4text0
|
||||
EXECUTE REMOVEDIR a/b/4/
|
||||
EXECUTE REMOVEFILE a/b/3/3text1
|
||||
EXECUTE REMOVEFILE a/b/3/3text0
|
||||
EXECUTE REMOVEDIR a/b/1/10/
|
||||
EXECUTE REMOVEDIR a/b/1/
|
||||
FINISH ADD precomplete
|
||||
FINISH ADD a/b/searchplugins/searchpluginstext0
|
||||
FINISH PATCH a/b/searchplugins/searchpluginspng1.png
|
||||
FINISH PATCH a/b/searchplugins/searchpluginspng0.png
|
||||
FINISH ADD a/b/extensions/extensions1/extensions1text0
|
||||
FINISH PATCH a/b/extensions/extensions1/extensions1png1.png
|
||||
FINISH PATCH a/b/extensions/extensions1/extensions1png0.png
|
||||
FINISH ADD a/b/extensions/extensions0/extensions0text0
|
||||
FINISH PATCH a/b/extensions/extensions0/extensions0png1.png
|
||||
FINISH PATCH a/b/extensions/extensions0/extensions0png0.png
|
||||
FINISH PATCH a/b/exe0.exe
|
||||
FINISH PATCH a/b/0/0exe0.exe
|
||||
FINISH ADD a/b/0/00/00text0
|
||||
FINISH PATCH a/b/0/00/00png0.png
|
||||
FINISH ADD a/b/2/20/20text0
|
||||
FINISH ADD a/b/2/20/20png0.png
|
||||
FINISH ADD a/b/0/00/00text2
|
||||
FINISH REMOVEFILE a/b/1/10/10text0
|
||||
FINISH REMOVEFILE a/b/0/00/00text1
|
||||
FINISH REMOVEDIR a/b/9/99/
|
||||
FINISH REMOVEDIR a/b/9/99/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/98/
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext0
|
||||
FINISH REMOVEFILE a/b/9/97/970/97xtext1
|
||||
FINISH REMOVEDIR a/b/9/97/970/
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext0
|
||||
FINISH REMOVEFILE a/b/9/97/971/97xtext1
|
||||
FINISH REMOVEDIR a/b/9/97/971/
|
||||
FINISH REMOVEDIR a/b/9/97/
|
||||
FINISH REMOVEFILE a/b/9/96/96text0
|
||||
FINISH REMOVEFILE a/b/9/96/96text1
|
||||
FINISH REMOVEDIR a/b/9/96/
|
||||
FINISH REMOVEDIR a/b/9/95/
|
||||
FINISH REMOVEDIR a/b/9/95/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/94/
|
||||
FINISH REMOVEDIR a/b/9/94/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/9/93/
|
||||
FINISH REMOVEDIR a/b/9/92/
|
||||
non-fatal error removing directory: a/b/9/92/, rv: 0
|
||||
FINISH REMOVEDIR a/b/9/91/
|
||||
non-fatal error removing directory: a/b/9/91/, rv: 0
|
||||
FINISH REMOVEDIR a/b/9/90/
|
||||
FINISH REMOVEDIR a/b/9/90/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/89/
|
||||
FINISH REMOVEDIR a/b/8/89/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/88/
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext0
|
||||
FINISH REMOVEFILE a/b/8/87/870/87xtext1
|
||||
FINISH REMOVEDIR a/b/8/87/870/
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext0
|
||||
FINISH REMOVEFILE a/b/8/87/871/87xtext1
|
||||
FINISH REMOVEDIR a/b/8/87/871/
|
||||
FINISH REMOVEDIR a/b/8/87/
|
||||
FINISH REMOVEFILE a/b/8/86/86text0
|
||||
FINISH REMOVEFILE a/b/8/86/86text1
|
||||
FINISH REMOVEDIR a/b/8/86/
|
||||
FINISH REMOVEDIR a/b/8/85/
|
||||
FINISH REMOVEDIR a/b/8/85/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/84/
|
||||
FINISH REMOVEDIR a/b/8/84/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEDIR a/b/8/83/
|
||||
FINISH REMOVEDIR a/b/8/82/
|
||||
non-fatal error removing directory: a/b/8/82/, rv: 0
|
||||
FINISH REMOVEDIR a/b/8/81/
|
||||
non-fatal error removing directory: a/b/8/81/, rv: 0
|
||||
FINISH REMOVEDIR a/b/8/80/
|
||||
FINISH REMOVEDIR a/b/8/80/
|
||||
directory no longer exists; skipping
|
||||
FINISH REMOVEFILE a/b/7/70/7xtest.exe
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext0
|
||||
FINISH REMOVEFILE a/b/7/70/7xtext1
|
||||
FINISH REMOVEDIR a/b/7/70/
|
||||
FINISH REMOVEFILE a/b/7/71/7xtest.exe
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext0
|
||||
FINISH REMOVEFILE a/b/7/71/7xtext1
|
||||
FINISH REMOVEDIR a/b/7/71/
|
||||
FINISH REMOVEFILE a/b/7/7text0
|
||||
FINISH REMOVEFILE a/b/7/7text1
|
||||
FINISH REMOVEDIR a/b/7/
|
||||
FINISH REMOVEDIR a/b/6/
|
||||
FINISH REMOVEFILE a/b/5/5text1
|
||||
FINISH REMOVEFILE a/b/5/5text0
|
||||
FINISH REMOVEFILE a/b/5/5test.exe
|
||||
FINISH REMOVEDIR a/b/5/
|
||||
FINISH REMOVEFILE a/b/4/4text1
|
||||
FINISH REMOVEFILE a/b/4/4text0
|
||||
FINISH REMOVEDIR a/b/4/
|
||||
FINISH REMOVEFILE a/b/3/3text1
|
||||
FINISH REMOVEFILE a/b/3/3text0
|
||||
FINISH REMOVEDIR a/b/1/10/
|
||||
FINISH REMOVEDIR a/b/1/
|
||||
succeeded
|
||||
calling QuitProgressUI
|
31
toolkit/mozapps/update/test/unit/data/partial_precomplete
Normal file
31
toolkit/mozapps/update/test/unit/data/partial_precomplete
Normal file
@ -0,0 +1,31 @@
|
||||
remove "precomplete"
|
||||
remove "a/b/searchplugins/searchpluginstext0"
|
||||
remove "a/b/searchplugins/searchpluginspng1.png"
|
||||
remove "a/b/searchplugins/searchpluginspng0.png"
|
||||
remove "a/b/removed-files"
|
||||
remove "a/b/extensions/extensions1/extensions1text0"
|
||||
remove "a/b/extensions/extensions1/extensions1png1.png"
|
||||
remove "a/b/extensions/extensions1/extensions1png0.png"
|
||||
remove "a/b/extensions/extensions0/extensions0text0"
|
||||
remove "a/b/extensions/extensions0/extensions0png1.png"
|
||||
remove "a/b/extensions/extensions0/extensions0png0.png"
|
||||
remove "a/b/exe0.exe"
|
||||
remove-cc "a/b/defaults/pref/channel-prefs.js"
|
||||
remove "a/b/2/20/20text0"
|
||||
remove "a/b/2/20/20png0.png"
|
||||
remove "a/b/0/0exe0.exe"
|
||||
remove "a/b/0/00/00text2"
|
||||
remove "a/b/0/00/00text0"
|
||||
remove "a/b/0/00/00png0.png"
|
||||
rmdir "a/b/searchplugins/"
|
||||
rmdir "a/b/extensions/extensions1/"
|
||||
rmdir "a/b/extensions/extensions0/"
|
||||
rmdir "a/b/extensions/"
|
||||
rmdir "a/b/defaults/pref/"
|
||||
rmdir "a/b/defaults/"
|
||||
rmdir "a/b/2/20/"
|
||||
rmdir "a/b/2/"
|
||||
rmdir "a/b/0/00/"
|
||||
rmdir "a/b/0/"
|
||||
rmdir "a/b/"
|
||||
rmdir "a/"
|
41
toolkit/mozapps/update/test/unit/data/partial_removed-files
Normal file
41
toolkit/mozapps/update/test/unit/data/partial_removed-files
Normal file
@ -0,0 +1,41 @@
|
||||
a/b/text0
|
||||
a/b/text1
|
||||
a/b/3/3text0
|
||||
a/b/3/3text1
|
||||
a/b/4/4exe0.exe
|
||||
a/b/4/4text0
|
||||
a/b/4/4text1
|
||||
a/b/4/
|
||||
a/b/5/5text0
|
||||
a/b/5/5text1
|
||||
a/b/5/*
|
||||
a/b/6/
|
||||
a/b/7/*
|
||||
a/b/8/80/
|
||||
a/b/8/81/
|
||||
a/b/8/82/
|
||||
a/b/8/83/
|
||||
a/b/8/84/
|
||||
a/b/8/85/*
|
||||
a/b/8/86/*
|
||||
a/b/8/87/*
|
||||
a/b/8/88/*
|
||||
a/b/8/89/*
|
||||
a/b/8/80/
|
||||
a/b/8/84/*
|
||||
a/b/8/85/*
|
||||
a/b/8/89/
|
||||
a/b/9/90/
|
||||
a/b/9/91/
|
||||
a/b/9/92/
|
||||
a/b/9/93/
|
||||
a/b/9/94/
|
||||
a/b/9/95/*
|
||||
a/b/9/96/*
|
||||
a/b/9/97/*
|
||||
a/b/9/98/*
|
||||
a/b/9/99/*
|
||||
a/b/9/90/
|
||||
a/b/9/94/*
|
||||
a/b/9/95/*
|
||||
a/b/9/99/
|
@ -0,0 +1,63 @@
|
||||
type "partial"
|
||||
add "precomplete"
|
||||
add "a/b/searchplugins/searchpluginstext0"
|
||||
patch-if "a/b/searchplugins/searchpluginspng1.png" "a/b/searchplugins/searchpluginspng1.png.patch" "a/b/searchplugins/searchpluginspng1.png"
|
||||
patch-if "a/b/searchplugins/searchpluginspng0.png" "a/b/searchplugins/searchpluginspng0.png.patch" "a/b/searchplugins/searchpluginspng0.png"
|
||||
add-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1text0"
|
||||
patch-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png1.png.patch" "a/b/extensions/extensions1/extensions1png1.png"
|
||||
patch-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png0.png.patch" "a/b/extensions/extensions1/extensions1png0.png"
|
||||
add-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0text0"
|
||||
patch-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png1.png.patch" "a/b/extensions/extensions0/extensions0png1.png"
|
||||
patch-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png0.png.patch" "a/b/extensions/extensions0/extensions0png0.png"
|
||||
patch "a/b/exe0.exe.patch" "a/b/exe0.exe"
|
||||
patch "a/b/0/0exe0.exe.patch" "a/b/0/0exe0.exe"
|
||||
add "a/b/0/00/00text0"
|
||||
patch "a/b/0/00/00png0.png.patch" "a/b/0/00/00png0.png"
|
||||
add "a/b/2/20/20text0"
|
||||
add "a/b/2/20/20png0.png"
|
||||
add "a/b/0/00/00text2"
|
||||
remove "a/b/1/10/10text0"
|
||||
remove "a/b/0/00/00text1"
|
||||
remove "a/b/text1"
|
||||
remove "a/b/text0"
|
||||
rmrfdir "a/b/9/99/"
|
||||
rmdir "a/b/9/99/"
|
||||
rmrfdir "a/b/9/98/"
|
||||
rmrfdir "a/b/9/97/"
|
||||
rmrfdir "a/b/9/96/"
|
||||
rmrfdir "a/b/9/95/"
|
||||
rmrfdir "a/b/9/95/"
|
||||
rmrfdir "a/b/9/94/"
|
||||
rmdir "a/b/9/94/"
|
||||
rmdir "a/b/9/93/"
|
||||
rmdir "a/b/9/92/"
|
||||
rmdir "a/b/9/91/"
|
||||
rmdir "a/b/9/90/"
|
||||
rmdir "a/b/9/90/"
|
||||
rmrfdir "a/b/8/89/"
|
||||
rmdir "a/b/8/89/"
|
||||
rmrfdir "a/b/8/88/"
|
||||
rmrfdir "a/b/8/87/"
|
||||
rmrfdir "a/b/8/86/"
|
||||
rmrfdir "a/b/8/85/"
|
||||
rmrfdir "a/b/8/85/"
|
||||
rmrfdir "a/b/8/84/"
|
||||
rmdir "a/b/8/84/"
|
||||
rmdir "a/b/8/83/"
|
||||
rmdir "a/b/8/82/"
|
||||
rmdir "a/b/8/81/"
|
||||
rmdir "a/b/8/80/"
|
||||
rmdir "a/b/8/80/"
|
||||
rmrfdir "a/b/7/"
|
||||
rmdir "a/b/6/"
|
||||
remove "a/b/5/5text1"
|
||||
remove "a/b/5/5text0"
|
||||
rmrfdir "a/b/5/"
|
||||
remove "a/b/4/4text1"
|
||||
remove "a/b/4/4text0"
|
||||
remove "a/b/4/4exe0.exe"
|
||||
rmdir "a/b/4/"
|
||||
remove "a/b/3/3text1"
|
||||
remove "a/b/3/3text0"
|
||||
rmdir "a/b/1/10/"
|
||||
rmdir "a/b/1/"
|
@ -90,10 +90,24 @@ const MAR_COMPLETE_FILE = "data/complete.mar";
|
||||
const MAR_PARTIAL_FILE = "data/partial.mar";
|
||||
const UPDATER_BIN_FILE = "updater" + BIN_SUFFIX;
|
||||
const UPDATES_DIR_SUFFIX = "_mar";
|
||||
const APPLY_DIR_RELPATH = "a/b/";
|
||||
const CHANNEL_CHANGE_FILE = "channelchange";
|
||||
|
||||
const CALLBACK_BIN_FILE = "callback_app" + BIN_SUFFIX;
|
||||
const CALLBACK_ARGS = ["./", "callback.log", "Test Arg 2", "Test Arg 3"];
|
||||
const LOG_COMPLETE_SUCCESS = "data/complete_log_success";
|
||||
const LOG_COMPLETE_CC_SUCCESS = "data/complete_cc_log_success";
|
||||
|
||||
const LOG_PARTIAL_SUCCESS = "data/partial_log_success";
|
||||
const LOG_PARTIAL_FAILURE = "data/partial_log_failure";
|
||||
|
||||
const ERR_CALLBACK_FILE_IN_USE = "NS_main: file in use - failed to " +
|
||||
"exclusively open executable file:"
|
||||
|
||||
const ERR_RENAME_FILE = "rename_file: failed to rename file";
|
||||
const ERR_UNABLE_OPEN_DEST = "unable to open destination file";
|
||||
const ERR_BACKUP_DISCARD = "backup_discard: unable to remove";
|
||||
|
||||
// variables are used instead of contants so tests can override these values
|
||||
var gCallbackBinFile = "callback_app" + BIN_SUFFIX;
|
||||
var gCallbackArgs = ["./", "callback.log", "Test Arg 2", "Test Arg 3"];
|
||||
|
||||
// Time to wait for the test helper process before continuing the test
|
||||
const TEST_HELPER_TIMEOUT = 100;
|
||||
@ -169,104 +183,107 @@ var gStatusText;
|
||||
*/
|
||||
var TEST_DIRS = [
|
||||
{
|
||||
relPathDir : "3/",
|
||||
relPathDir : "a/b/3/",
|
||||
dirRemoved : false,
|
||||
files : ["text0", "text1"],
|
||||
files : ["3text0", "3text1"],
|
||||
filesRemoved : true
|
||||
}, {
|
||||
relPathDir : "4/",
|
||||
relPathDir : "a/b/4/",
|
||||
dirRemoved : true,
|
||||
files : ["text0", "text1"],
|
||||
files : ["4text0", "4text1"],
|
||||
filesRemoved : true
|
||||
}, {
|
||||
relPathDir : "5/",
|
||||
relPathDir : "a/b/5/",
|
||||
dirRemoved : true,
|
||||
files : ["test.exe", "text0", "text1"],
|
||||
files : ["5test.exe", "5text0", "5text1"],
|
||||
filesRemoved : true
|
||||
}, {
|
||||
relPathDir : "6/",
|
||||
relPathDir : "a/b/6/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "7/",
|
||||
relPathDir : "a/b/7/",
|
||||
dirRemoved : true,
|
||||
files : ["text0", "text1"],
|
||||
files : ["7text0", "7text1"],
|
||||
subDirs : ["70/", "71/"],
|
||||
subDirFiles : ["test.exe", "text0", "text1"]
|
||||
subDirFiles : ["7xtest.exe", "7xtext0", "7xtext1"]
|
||||
}, {
|
||||
relPathDir : "8/",
|
||||
relPathDir : "a/b/8/",
|
||||
dirRemoved : false
|
||||
}, {
|
||||
relPathDir : "8/80/",
|
||||
relPathDir : "a/b/8/80/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "8/81/",
|
||||
relPathDir : "a/b/8/81/",
|
||||
dirRemoved : false,
|
||||
files : ["text0", "text1"]
|
||||
files : ["81text0", "81text1"]
|
||||
}, {
|
||||
relPathDir : "8/82/",
|
||||
relPathDir : "a/b/8/82/",
|
||||
dirRemoved : false,
|
||||
subDirs : ["820/", "821/"]
|
||||
}, {
|
||||
relPathDir : "8/83/",
|
||||
relPathDir : "a/b/8/83/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "8/84/",
|
||||
relPathDir : "a/b/8/84/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "8/85/",
|
||||
relPathDir : "a/b/8/85/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "8/86/",
|
||||
relPathDir : "a/b/8/86/",
|
||||
dirRemoved : true,
|
||||
files : ["text0", "text1"]
|
||||
files : ["86text0", "86text1"]
|
||||
}, {
|
||||
relPathDir : "8/87/",
|
||||
relPathDir : "a/b/8/87/",
|
||||
dirRemoved : true,
|
||||
subDirs : ["870/", "871/"],
|
||||
subDirFiles : ["text0", "text1"]
|
||||
subDirFiles : ["87xtext0", "87xtext1"]
|
||||
}, {
|
||||
relPathDir : "8/88/",
|
||||
relPathDir : "a/b/8/88/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "8/89/",
|
||||
relPathDir : "a/b/8/89/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "9/90/",
|
||||
relPathDir : "a/b/9/90/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "9/91/",
|
||||
relPathDir : "a/b/9/91/",
|
||||
dirRemoved : false,
|
||||
files : ["text0", "text1"]
|
||||
files : ["91text0", "91text1"]
|
||||
}, {
|
||||
relPathDir : "9/92/",
|
||||
relPathDir : "a/b/9/92/",
|
||||
dirRemoved : false,
|
||||
subDirs : ["920/", "921/"]
|
||||
}, {
|
||||
relPathDir : "9/93/",
|
||||
relPathDir : "a/b/9/93/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "9/94/",
|
||||
relPathDir : "a/b/9/94/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "9/95/",
|
||||
relPathDir : "a/b/9/95/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "9/96/",
|
||||
relPathDir : "a/b/9/96/",
|
||||
dirRemoved : true,
|
||||
files : ["text0", "text1"]
|
||||
files : ["96text0", "96text1"]
|
||||
}, {
|
||||
relPathDir : "9/97/",
|
||||
relPathDir : "a/b/9/97/",
|
||||
dirRemoved : true,
|
||||
subDirs : ["970/", "971/"],
|
||||
subDirFiles : ["text0", "text1"]
|
||||
subDirFiles : ["97xtext0", "97xtext1"]
|
||||
}, {
|
||||
relPathDir : "9/98/",
|
||||
relPathDir : "a/b/9/98/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
relPathDir : "9/99/",
|
||||
relPathDir : "a/b/9/99/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
// Populated by tests if needed.
|
||||
var ADDITIONAL_TEST_DIRS = [];
|
||||
|
||||
// Set to true to log additional information for debugging. To log additional
|
||||
// information for an individual test set DEBUG_AUS_TEST to true in the test's
|
||||
// run_test function.
|
||||
@ -342,16 +359,26 @@ function pathHandler(metadata, response) {
|
||||
* Helper function for getting the relative path to the directory where the
|
||||
* update will be applied.
|
||||
*
|
||||
* The main files in the update are located two directories below the apply to
|
||||
* directory since Mac OS X sets the last modified time for the root directory
|
||||
* to the current time and if the update changes any files in the root directory
|
||||
* then it wouldn't be possible to test (bug 600098).
|
||||
*
|
||||
* @return The relative path to the directory where the update will be applied.
|
||||
*/
|
||||
function getApplyDirPath() {
|
||||
return TEST_ID + APPLY_TO_DIR_SUFFIX + APPLY_DIR_RELPATH;
|
||||
return TEST_ID + APPLY_TO_DIR_SUFFIX;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for getting the nsIFile for the directory where the update
|
||||
* will be applied.
|
||||
*
|
||||
* The main files in the update are located two directories below the apply to
|
||||
* directory since Mac OS X sets the last modified time for the root directory
|
||||
* to the current time and if the update changes any files in the root directory
|
||||
* then it wouldn't be possible to test (bug 600098).
|
||||
*
|
||||
* @return The nsIFile for the directory where the update will be applied.
|
||||
*/
|
||||
function getApplyDirFile(aRelPath, allowNonexistent) {
|
||||
@ -394,13 +421,12 @@ function runUpdate() {
|
||||
if (/ /.test(updatesDirPath))
|
||||
updatesDirPath = '"' + updatesDirPath + '"';
|
||||
|
||||
let applyToDir = do_get_file(getApplyDirPath(), true);
|
||||
let applyToDir = getApplyDirFile();
|
||||
let applyToDirPath = applyToDir.path;
|
||||
if (/ /.test(applyToDirPath))
|
||||
applyToDirPath = '"' + applyToDirPath + '"';
|
||||
|
||||
let callbackApp = applyToDir.clone();
|
||||
callbackApp.append(CALLBACK_BIN_FILE);
|
||||
let callbackApp = getApplyDirFile("a/b/" + gCallbackBinFile);
|
||||
callbackApp.permissions = PERMS_DIRECTORY;
|
||||
|
||||
let cwdPath = callbackApp.parent.path;
|
||||
@ -412,7 +438,7 @@ function runUpdate() {
|
||||
callbackAppPath = '"' + callbackAppPath + '"';
|
||||
|
||||
let args = [updatesDirPath, applyToDirPath, 0, cwdPath, callbackAppPath].
|
||||
concat(CALLBACK_ARGS);
|
||||
concat(gCallbackArgs);
|
||||
let process = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
process.init(updateBin);
|
||||
@ -449,7 +475,7 @@ function getLaunchBin() {
|
||||
function waitForHelperSleep() {
|
||||
// Give the lock file process time to lock the file before updating otherwise
|
||||
// this test can fail intermittently on Windows debug builds.
|
||||
let output = getApplyDirFile("output", true);
|
||||
let output = getApplyDirFile("a/b/output", true);
|
||||
if (readFile(output) != "sleeping\n") {
|
||||
do_timeout(TEST_HELPER_TIMEOUT, waitForHelperSleep);
|
||||
return;
|
||||
@ -461,13 +487,13 @@ function waitForHelperSleep() {
|
||||
function waitForHelperFinished() {
|
||||
// Give the lock file process time to lock the file before updating otherwise
|
||||
// this test can fail intermittently on Windows debug builds.
|
||||
let output = getApplyDirFile("output", true);
|
||||
let output = getApplyDirFile("a/b/output", true);
|
||||
if (readFile(output) != "finished\n") {
|
||||
do_timeout(TEST_HELPER_TIMEOUT, waitForHelperFinished);
|
||||
return;
|
||||
}
|
||||
output.remove(false);
|
||||
let input = getApplyDirFile("input", true);
|
||||
let input = getApplyDirFile("a/b/input", true);
|
||||
if (input.exists()) {
|
||||
input.remove(false);
|
||||
}
|
||||
@ -475,7 +501,7 @@ function waitForHelperFinished() {
|
||||
}
|
||||
|
||||
function setupHelperFinish() {
|
||||
let input = getApplyDirFile("input", true);
|
||||
let input = getApplyDirFile("a/b/input", true);
|
||||
writeFile(input, "finish\n");
|
||||
do_timeout(TEST_HELPER_TIMEOUT, waitForHelperFinished);
|
||||
}
|
||||
@ -548,8 +574,8 @@ function setupUpdaterTest(aMarFile) {
|
||||
});
|
||||
|
||||
let helperBin = do_get_file(HELPER_BIN_FILE);
|
||||
let afterApplyBinDir = applyToDir.clone();
|
||||
helperBin.copyTo(afterApplyBinDir, CALLBACK_BIN_FILE);
|
||||
let afterApplyBinDir = getApplyDirFile("a/b/", true);
|
||||
helperBin.copyTo(afterApplyBinDir, gCallbackBinFile);
|
||||
|
||||
let updaterIniContents = "[Strings]\n" +
|
||||
"Title=Update XPCShell Test\n" +
|
||||
@ -565,7 +591,8 @@ function setupUpdaterTest(aMarFile) {
|
||||
|
||||
// Add the test directory that will be updated for a successful update or left in
|
||||
// the initial state for a failed update.
|
||||
TEST_DIRS.forEach(function SUT_TD_FE(aTestDir) {
|
||||
var testDirs = TEST_DIRS.concat(ADDITIONAL_TEST_DIRS);
|
||||
testDirs.forEach(function SUT_TD_FE(aTestDir) {
|
||||
let testDir = getApplyDirFile(aTestDir.relPathDir, true);
|
||||
if (!testDir.exists()) {
|
||||
testDir.create(AUS_Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
|
||||
@ -616,7 +643,7 @@ function cleanupUpdaterTest() {
|
||||
}
|
||||
|
||||
// Try to remove the updates and the apply to directories.
|
||||
let applyToDir = do_get_file(TEST_ID + APPLY_TO_DIR_SUFFIX, true);
|
||||
let applyToDir = getApplyDirFile(null, true);
|
||||
try {
|
||||
removeDirRecursive(applyToDir);
|
||||
}
|
||||
@ -629,6 +656,36 @@ function cleanupUpdaterTest() {
|
||||
cleanUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for updater binary tests for verifying the contents of the
|
||||
* update log after a successful update.
|
||||
*/
|
||||
function checkUpdateLogContents(aCompareLogFile) {
|
||||
// Skip this test on Windows CE since it doesn't use relative paths.
|
||||
if (IS_WINCE)
|
||||
return;
|
||||
|
||||
let updateLog = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX, true);
|
||||
updateLog.append(FILE_UPDATE_LOG);
|
||||
// Skip the first two lines since they contain absolute paths.
|
||||
let updateLogContents = readFileBytes(updateLog).split("\n").slice(2).join("\n");
|
||||
updateLogContents = updateLogContents.replace(/\r/g, "");
|
||||
// Replace error codes since they are different on each platform.
|
||||
updateLogContents = updateLogContents.replace(/, err:.*\n/g, "\n");
|
||||
|
||||
let compareLog = do_get_file(aCompareLogFile);
|
||||
let compareLogContents = readFileBytes(compareLog);
|
||||
|
||||
do_check_eq(updateLogContents, compareLogContents);
|
||||
}
|
||||
|
||||
function checkUpdateLogContains(aCheckString) {
|
||||
let updateLog = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX, true);
|
||||
updateLog.append(FILE_UPDATE_LOG);
|
||||
let updateLogContents = readFileBytes(updateLog);
|
||||
do_check_true(updateLogContents.indexOf(aCheckString) != -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for updater binary tests for verifying the state of files and
|
||||
* directories after a successful update.
|
||||
@ -658,12 +715,6 @@ function checkFilesAfterUpdateSuccess() {
|
||||
if (aTestFile.compareFile) {
|
||||
do_check_eq(readFileBytes(testFile),
|
||||
readFileBytes(do_get_file(aTestFile.compareFile)));
|
||||
if (aTestFile.originalFile) {
|
||||
// Verify that readFileBytes returned the entire contents by checking
|
||||
// the contents against the original file.
|
||||
do_check_neq(readFileBytes(testFile),
|
||||
readFileBytes(do_get_file(aTestFile.originalFile)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
do_check_eq(readFileBytes(testFile), aTestFile.compareContents);
|
||||
@ -676,7 +727,8 @@ function checkFilesAfterUpdateSuccess() {
|
||||
|
||||
logTestInfo("testing operations specified in removed-files were performed " +
|
||||
"after a successful update");
|
||||
TEST_DIRS.forEach(function CFAUS_TD_FE(aTestDir) {
|
||||
var testDirs = TEST_DIRS.concat(ADDITIONAL_TEST_DIRS);
|
||||
testDirs.forEach(function CFAUS_TD_FE(aTestDir) {
|
||||
let testDir = getApplyDirFile(aTestDir.relPathDir, true);
|
||||
logTestInfo("testing directory: " + testDir.path);
|
||||
if (aTestDir.dirRemoved) {
|
||||
@ -805,7 +857,7 @@ function checkFilesAfterUpdateCommon() {
|
||||
}
|
||||
|
||||
logTestInfo("testing backup files should not be left behind");
|
||||
let applyToDir = do_get_file(TEST_ID + APPLY_TO_DIR_SUFFIX, true);
|
||||
let applyToDir = getApplyDirFile(null, true);
|
||||
checkFilesInDirRecursive(applyToDir, checkForBackupFiles);
|
||||
}
|
||||
|
||||
@ -815,13 +867,13 @@ function checkFilesAfterUpdateCommon() {
|
||||
* the callback application.
|
||||
*/
|
||||
function checkCallbackAppLog() {
|
||||
let appLaunchLog = getApplyDirFile(CALLBACK_ARGS[1], true);
|
||||
let appLaunchLog = getApplyDirFile("a/b/" + gCallbackArgs[1], true);
|
||||
if (!appLaunchLog.exists()) {
|
||||
do_timeout(TEST_HELPER_TIMEOUT, checkCallbackAppLog);
|
||||
return;
|
||||
}
|
||||
|
||||
let expectedLogContents = CALLBACK_ARGS.join("\n") + "\n";
|
||||
let expectedLogContents = gCallbackArgs.join("\n") + "\n";
|
||||
let logContents = readFile(appLaunchLog);
|
||||
// It is possible for the log file contents check to occur before the log file
|
||||
// contents are completely written so wait until the contents are the expected
|
||||
|
@ -44,11 +44,191 @@ const TEST_ID = "0110";
|
||||
// difference in the last modified time.
|
||||
const MAX_TIME_DIFFERENCE = 60000;
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0767
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/complete_precomplete",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/complete_removed-files",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0677,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
@ -56,50 +236,36 @@ const TEST_FILES = [
|
||||
originalPerms : 0776,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeModified\n",
|
||||
compareContents : "ToBeModified\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0677,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0644
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -132,6 +298,7 @@ function run_test() {
|
||||
do_check_eq(exitValue, 0);
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
// For Mac OS X check that the last modified time for a directory has been
|
||||
@ -145,10 +312,10 @@ function run_test() {
|
||||
}
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -44,80 +44,230 @@ const TEST_ID = "0111";
|
||||
// difference in the last modified time.
|
||||
const MAX_TIME_DIFFERENCE = 60000;
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeModified\n",
|
||||
compareContents : "Modified\n",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "00text2",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : "Added\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "20text0",
|
||||
relPathDir : "2/20/",
|
||||
originalContents : null,
|
||||
compareContents : "Added\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete_precomplete",
|
||||
compareFile : "data/partial_precomplete",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text2",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/10/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -134,9 +284,15 @@ function run_test() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
// Check that trying to change channels for a partial update doesn't change
|
||||
// the update channel (the channel-prefs.js file should not be updated).
|
||||
let force = updatesDir.clone();
|
||||
force.append(CHANNEL_CHANGE_FILE);
|
||||
force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE);
|
||||
|
||||
// For Mac OS X set the last modified time for the root directory to a date in
|
||||
// the past to test that the last modified time is updated on a successful
|
||||
// update (bug 600098).
|
||||
// the past to test that the last modified time is updated on all updates since
|
||||
// the precomplete file in the root of the bundle is renamed, etc. (bug 600098).
|
||||
if (IS_MACOSX) {
|
||||
let now = Date.now();
|
||||
let yesterday = now - (1000 * 60 * 60 * 24);
|
||||
@ -163,10 +319,10 @@ function run_test() {
|
||||
}
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -39,63 +39,228 @@
|
||||
/* General Partial MAR File Patch Apply Failure Test */
|
||||
|
||||
const TEST_ID = "0112";
|
||||
// All we care about is that the last modified time has changed so that Mac OS
|
||||
// X Launch Services invalidates its cache so the test allows up to one minute
|
||||
// difference in the last modified time.
|
||||
const MAX_TIME_DIFFERENCE = 60000;
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete_precomplete",
|
||||
compareFile : "data/complete_precomplete",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0775
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Not patched for failed update (patch)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch) and causes " +
|
||||
"LoadSourceFile failed",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text2",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/1/10/",
|
||||
dirRemoved : false
|
||||
}, {
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/1/",
|
||||
dirRemoved : false
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -112,19 +277,19 @@ function run_test() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
// For Mac OS X set the last modified time for a directory to a date in the
|
||||
// past to test that the last modified time on the directories in not updated
|
||||
// when an update fails (bug 600098).
|
||||
let lastModTime;
|
||||
// Check that trying to change channels for a failed partial update doesn't
|
||||
// change the update channel (the channel-prefs.js file should not be updated).
|
||||
let force = updatesDir.clone();
|
||||
force.append(CHANNEL_CHANGE_FILE);
|
||||
force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE);
|
||||
|
||||
// For Mac OS X set the last modified time for the root directory to a date in
|
||||
// the past to test that the last modified time is updated on all updates since
|
||||
// the precomplete file in the root of the bundle is renamed, etc. (bug 600098).
|
||||
if (IS_MACOSX) {
|
||||
// All we care about is that the last modified time has not changed when an
|
||||
// update has failed.
|
||||
let now = Date.now();
|
||||
lastModTime = now - (1000 * 60 * 60 * 24);
|
||||
applyToDir.lastModifiedTime = lastModTime;
|
||||
// Set lastModTime to the value the OS returns in case it is different than
|
||||
// the value stored by the OS.
|
||||
lastModTime = applyToDir.lastModifiedTime;
|
||||
let yesterday = now - (1000 * 60 * 60 * 24);
|
||||
applyToDir.lastModifiedTime = yesterday;
|
||||
}
|
||||
|
||||
// apply the partial mar
|
||||
@ -138,19 +303,21 @@ function run_test() {
|
||||
// code for the failure.
|
||||
do_check_eq(readStatusFile(updatesDir).split(": ")[0], STATE_FAILED);
|
||||
|
||||
// For Mac OS X check that the last modified time for a directory has not been
|
||||
// updated after a failed update (bug 600098).
|
||||
// For Mac OS X check that the last modified time for a directory has been
|
||||
// updated after a successful update (bug 600098).
|
||||
if (IS_MACOSX) {
|
||||
logTestInfo("testing last modified time on the apply to directory has " +
|
||||
"not changed after a failed update (bug 600098)");
|
||||
do_check_eq(applyToDir.lastModifiedTime, lastModTime);
|
||||
"changed after a successful update (bug 600098)");
|
||||
let now = Date.now();
|
||||
let timeDiff = Math.abs(applyToDir.lastModifiedTime - now);
|
||||
do_check_true(timeDiff < MAX_TIME_DIFFERENCE);
|
||||
}
|
||||
|
||||
checkFilesAfterUpdateFailure();
|
||||
checkUpdateLogContents(LOG_PARTIAL_FAILURE);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -0,0 +1,291 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Channel change complete MAR file patch apply test */
|
||||
|
||||
const TEST_ID = "0120";
|
||||
// All we care about is that the last modified time has changed so that Mac OS
|
||||
// X Launch Services invalidates its cache so the test allows up to one minute
|
||||
// difference in the last modified time.
|
||||
const MAX_TIME_DIFFERENCE = 60000;
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
const TEST_FILES = [
|
||||
{
|
||||
description : "Added by update.manifest (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/complete_precomplete",
|
||||
originalPerms : 0755,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/complete_removed-files",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0677,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0776,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
if (IS_ANDROID) {
|
||||
logTestInfo("this test is not applicable to Android... returning early");
|
||||
return;
|
||||
}
|
||||
|
||||
do_test_pending();
|
||||
do_register_cleanup(cleanupUpdaterTest);
|
||||
|
||||
setupUpdaterTest(MAR_COMPLETE_FILE);
|
||||
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
// Check that trying to change channels for a complete update changes the
|
||||
// update channel (the channel-prefs.js file should be updated).
|
||||
let force = updatesDir.clone();
|
||||
force.append(CHANNEL_CHANGE_FILE);
|
||||
force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE);
|
||||
|
||||
// For Mac OS X set the last modified time for the root directory to a date in
|
||||
// the past to test that the last modified time is updated on a successful
|
||||
// update (bug 600098).
|
||||
if (IS_MACOSX) {
|
||||
let now = Date.now();
|
||||
let yesterday = now - (1000 * 60 * 60 * 24);
|
||||
applyToDir.lastModifiedTime = yesterday;
|
||||
}
|
||||
|
||||
// apply the complete mar
|
||||
let exitValue = runUpdate();
|
||||
logTestInfo("testing updater binary process exitValue for success when " +
|
||||
"applying a complete mar");
|
||||
do_check_eq(exitValue, 0);
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
// For Mac OS X check that the last modified time for a directory has been
|
||||
// updated after a successful update (bug 600098).
|
||||
if (IS_MACOSX) {
|
||||
logTestInfo("testing last modified time on the apply to directory has " +
|
||||
"changed after a successful update (bug 600098)");
|
||||
let now = Date.now();
|
||||
let timeDiff = Math.abs(applyToDir.lastModifiedTime - now);
|
||||
do_check_true(timeDiff < MAX_TIME_DIFFERENCE);
|
||||
}
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContents(LOG_COMPLETE_CC_SUCCESS);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
}
|
@ -0,0 +1,224 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Replace app binary complete MAR file patch apply success test */
|
||||
|
||||
const TEST_ID = "0150";
|
||||
const MAR_COMPLETE_WIN_FILE = "data/complete_win.mar";
|
||||
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/complete_precomplete"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/complete_removed-files"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_after.exe",
|
||||
compareFile : "data/partial_in_use_win_before.exe"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add) file in use",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_after.exe",
|
||||
compareFile : "data/partial_in_use_win_before.exe"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
if (!IS_WIN || IS_WINCE) {
|
||||
logTestInfo("this test is only applicable to Windows... returning early");
|
||||
return;
|
||||
}
|
||||
|
||||
do_test_pending();
|
||||
do_register_cleanup(cleanupUpdaterTest);
|
||||
|
||||
setupUpdaterTest(MAR_COMPLETE_WIN_FILE);
|
||||
|
||||
gCallbackBinFile = "exe0.exe";
|
||||
|
||||
// apply the complete mar
|
||||
let exitValue = runUpdate();
|
||||
logTestInfo("testing updater binary process exitValue for success when " +
|
||||
"applying a complete mar");
|
||||
do_check_eq(exitValue, 0);
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
}
|
@ -0,0 +1,226 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Patch app binary partial MAR file patch apply success test */
|
||||
|
||||
const TEST_ID = "0151";
|
||||
const MAR_IN_USE_WIN_FILE = "data/partial_win.mar";
|
||||
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete_precomplete",
|
||||
compareFile : "data/partial_precomplete"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_before.exe",
|
||||
compareFile : "data/partial_in_use_win_after.exe"
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch) file in use",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_before.exe",
|
||||
compareFile : "data/partial_in_use_win_after.exe"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text2",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/10/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
if (!IS_WIN || IS_WINCE) {
|
||||
logTestInfo("this test is only applicable to Windows... returning early");
|
||||
return;
|
||||
}
|
||||
|
||||
do_test_pending();
|
||||
do_register_cleanup(cleanupUpdaterTest);
|
||||
|
||||
setupUpdaterTest(MAR_IN_USE_WIN_FILE);
|
||||
|
||||
gCallbackBinFile = "exe0.exe";
|
||||
|
||||
// apply the complete mar
|
||||
let exitValue = runUpdate();
|
||||
logTestInfo("testing updater binary process exitValue for success when " +
|
||||
"applying a partial mar");
|
||||
do_check_eq(exitValue, 0);
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
}
|
@ -10,11 +10,191 @@ const TEST_ID = "0160";
|
||||
// difference in the last modified time.
|
||||
const MAX_TIME_DIFFERENCE = 60000;
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0767
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/complete_precomplete",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/complete_removed-files",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0677,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
@ -22,50 +202,36 @@ const TEST_FILES = [
|
||||
originalPerms : 0776,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeModified\n",
|
||||
compareContents : "ToBeModified\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0677,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0767,
|
||||
comparePerms : 0644
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png",
|
||||
originalPerms : 0777,
|
||||
comparePerms : 0755
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -81,9 +247,9 @@ function run_test() {
|
||||
setupUpdaterTest(MAR_COMPLETE_FILE);
|
||||
|
||||
// Launch the callback helper application so it is in use during the update
|
||||
let callbackApp = getApplyDirFile(CALLBACK_BIN_FILE);
|
||||
let callbackApp = getApplyDirFile("a/b/" + CALLBACK_BIN_FILE);
|
||||
callbackApp.permissions = PERMS_DIRECTORY;
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20"];
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20"];
|
||||
let callbackAppProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
callbackAppProcess.init(callbackApp);
|
||||
@ -115,10 +281,8 @@ function doUpdate() {
|
||||
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
// For Mac OS X check that the last modified time for a directory has been
|
||||
@ -127,6 +291,7 @@ function checkUpdate() {
|
||||
logTestInfo("testing last modified time on the apply to directory has " +
|
||||
"changed after a successful update (bug 600098)");
|
||||
let now = Date.now();
|
||||
let applyToDir = getApplyDirFile();
|
||||
let timeDiff = Math.abs(applyToDir.lastModifiedTime - now);
|
||||
do_check_true(timeDiff < MAX_TIME_DIFFERENCE);
|
||||
}
|
||||
|
@ -6,50 +6,182 @@
|
||||
|
||||
const TEST_ID = "0160";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/partial_precomplete"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/partial_removed-files"
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : false
|
||||
}, {
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : false
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -64,8 +196,8 @@ function run_test() {
|
||||
setupUpdaterTest(MAR_COMPLETE_FILE);
|
||||
|
||||
// Launch the callback helper application so it is in use during the update
|
||||
let callbackApp = getApplyDirFile(CALLBACK_BIN_FILE);
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20"];
|
||||
let callbackApp = getApplyDirFile("a/b/" + gCallbackBinFile);
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20"];
|
||||
let callbackAppProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
callbackAppProcess.init(callbackApp);
|
||||
@ -85,19 +217,17 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_FAILED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
// The update status format for a failure is failed: # where # is the error
|
||||
// code for the failure.
|
||||
do_check_eq(readStatusFile(updatesDir).split(": ")[0], STATE_FAILED);
|
||||
|
||||
checkFilesAfterUpdateFailure();
|
||||
checkUpdateLogContains(ERR_CALLBACK_FILE_IN_USE);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -6,50 +6,182 @@
|
||||
|
||||
const TEST_ID = "0170";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/partial_precomplete"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/partial_removed-files"
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : false
|
||||
}, {
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : false
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -65,11 +197,15 @@ function run_test() {
|
||||
|
||||
// Exclusively lock an existing file so it is in use during the update
|
||||
let helperBin = do_get_file(HELPER_BIN_FILE);
|
||||
let applyToDir = getApplyDirFile();
|
||||
helperBin.copyTo(applyToDir, HELPER_BIN_FILE);
|
||||
helperBin = getApplyDirFile(HELPER_BIN_FILE);
|
||||
let lockFileRelPath = TEST_FILES[3].relPathDir + TEST_FILES[3].fileName;
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20", lockFileRelPath];
|
||||
let helperDestDir = getApplyDirFile("a/b/");
|
||||
helperBin.copyTo(helperDestDir, HELPER_BIN_FILE);
|
||||
helperBin = getApplyDirFile("a/b/" + HELPER_BIN_FILE);
|
||||
// Strip off the first two directories so the path has to be from the helper's
|
||||
// working directory.
|
||||
let lockFileRelPath = TEST_FILES[3].relPathDir.split("/");
|
||||
lockFileRelPath = lockFileRelPath.slice(2);
|
||||
lockFileRelPath = lockFileRelPath.join("/") + "/" + TEST_FILES[3].fileName;
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20", lockFileRelPath];
|
||||
let lockFileProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
lockFileProcess.init(helperBin);
|
||||
@ -89,19 +225,17 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_FAILED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
// The update status format for a failure is failed: # where # is the error
|
||||
// code for the failure.
|
||||
do_check_eq(readStatusFile(updatesDir).split(": ")[0], STATE_FAILED);
|
||||
|
||||
checkFilesAfterUpdateFailure();
|
||||
checkUpdateLogContains(ERR_RENAME_FILE);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -6,54 +6,185 @@
|
||||
|
||||
const TEST_ID = "0171";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ShouldNotBeModified\n",
|
||||
compareContents : "ShouldNotBeModified\n",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete_precomplete",
|
||||
compareFile : "data/complete_precomplete"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not patched for failed update (patch-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not patched for failed update (patch)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not patched for failed update (patch) and causes " +
|
||||
"LoadSourceFile failed",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not patched for failed update (patch)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not added for failed update (add)",
|
||||
fileName : "00text2",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Not removed for failed update (remove)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ShouldNotBeDeleted\n",
|
||||
compareContents : "ShouldNotBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/1/10/",
|
||||
dirRemoved : false
|
||||
}, {
|
||||
description : "Not removed for failed update (rmdir)",
|
||||
relPathDir : "a/b/1/",
|
||||
dirRemoved : false
|
||||
}];
|
||||
|
||||
// XXX LoadSourceFile: destination file size 759 does not match expected size 854
|
||||
// Needs helper since it is a partial
|
||||
function run_test() {
|
||||
if (!IS_WIN || IS_WINCE) {
|
||||
logTestInfo("this test is only applicable to Windows... returning early");
|
||||
@ -67,11 +198,15 @@ function run_test() {
|
||||
|
||||
// Exclusively lock an existing file so it is in use during the update
|
||||
let helperBin = do_get_file(HELPER_BIN_FILE);
|
||||
let applyToDir = getApplyDirFile();
|
||||
helperBin.copyTo(applyToDir, HELPER_BIN_FILE);
|
||||
helperBin = getApplyDirFile(HELPER_BIN_FILE);
|
||||
let lockFileRelPath = TEST_FILES[3].relPathDir + TEST_FILES[3].fileName;
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20", lockFileRelPath];
|
||||
let helperDestDir = getApplyDirFile("a/b/");
|
||||
helperBin.copyTo(helperDestDir, HELPER_BIN_FILE);
|
||||
helperBin = getApplyDirFile("a/b/" + HELPER_BIN_FILE);
|
||||
// Strip off the first two directories so the path has to be from the helper's
|
||||
// working directory.
|
||||
let lockFileRelPath = TEST_FILES[3].relPathDir.split("/");
|
||||
lockFileRelPath = lockFileRelPath.slice(2);
|
||||
lockFileRelPath = lockFileRelPath.join("/") + "/" + TEST_FILES[3].fileName;
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20", lockFileRelPath];
|
||||
let lockFileProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
lockFileProcess.init(helperBin);
|
||||
@ -91,19 +226,17 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_FAILED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
// The update status format for a failure is failed: # where # is the error
|
||||
// code for the failure.
|
||||
do_check_eq(readStatusFile(updatesDir).split(": ")[0], STATE_FAILED);
|
||||
|
||||
checkFilesAfterUpdateFailure();
|
||||
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
|
||||
|
||||
logTestInfo("testing tobedeleted directory doesn't exist");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_false(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -6,50 +6,188 @@
|
||||
|
||||
const TEST_ID = "0180";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeModified\n",
|
||||
compareContents : "ToBeModified\n",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : HELPER_BIN_FILE,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/complete_precomplete"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/complete_removed-files"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : HELPER_BIN_FILE,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add) file in use",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : HELPER_BIN_FILE,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -64,9 +202,9 @@ function run_test() {
|
||||
setupUpdaterTest(MAR_COMPLETE_FILE);
|
||||
|
||||
// Launch an existing file so it is in use during the update
|
||||
let fileInUseBin = getApplyDirFile(TEST_FILES[3].relPathDir +
|
||||
TEST_FILES[3].fileName);
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20"];
|
||||
let fileInUseBin = getApplyDirFile(TEST_FILES[14].relPathDir +
|
||||
TEST_FILES[14].fileName);
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20"];
|
||||
let fileInUseProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
fileInUseProcess.init(fileInUseBin);
|
||||
@ -86,17 +224,15 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContains(ERR_BACKUP_DISCARD);
|
||||
|
||||
logTestInfo("testing tobedeleted directory exists");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_true(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -5,66 +5,192 @@
|
||||
/* File in use partial MAR file patch apply success test */
|
||||
|
||||
const TEST_ID = "0181";
|
||||
const MAR_IN_USE_WIN_FILE = "data/partial_in_use_win.mar";
|
||||
const MAR_IN_USE_WIN_FILE = "data/partial_win.mar";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
var TEST_FILES = [
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete_precomplete",
|
||||
compareFile : "data/partial_precomplete"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeModified\n",
|
||||
compareContents : "Modified\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_before.exe",
|
||||
compareFile : "data/partial_in_use_win_after.exe"
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "00text2",
|
||||
relPathDir : "0/00/",
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "Added\n",
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "20text0",
|
||||
relPathDir : "2/20/",
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : "Added\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_before.exe",
|
||||
compareFile : "data/partial_in_use_win_after.exe"
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch) file in use",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_in_use_win_before.exe",
|
||||
compareFile : "data/partial_in_use_win_after.exe"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text2",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/10/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -79,9 +205,9 @@ function run_test() {
|
||||
setupUpdaterTest(MAR_IN_USE_WIN_FILE);
|
||||
|
||||
// Launch an existing file so it is in use during the update
|
||||
let fileInUseBin = getApplyDirFile(TEST_FILES[3].relPathDir +
|
||||
TEST_FILES[3].fileName);
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20"];
|
||||
let fileInUseBin = getApplyDirFile(TEST_FILES[12].relPathDir +
|
||||
TEST_FILES[12].fileName);
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20"];
|
||||
let fileInUseProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
fileInUseProcess.init(fileInUseBin);
|
||||
@ -101,17 +227,15 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContains(ERR_BACKUP_DISCARD);
|
||||
|
||||
logTestInfo("testing tobedeleted directory exists");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_true(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -2,54 +2,192 @@
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File in use complete MAR file patch apply success test */
|
||||
/* File in use inside removed dir complete MAR file patch apply success test */
|
||||
|
||||
const TEST_ID = "0182";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeModified\n",
|
||||
compareContents : "ToBeModified\n",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : HELPER_BIN_FILE,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeReplacedWithToBeDeleted\n",
|
||||
compareContents : "ToBeDeleted\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_precomplete",
|
||||
compareFile : "data/complete_precomplete"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "removed-files",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial_removed-files",
|
||||
compareFile : "data/complete_removed-files"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/partial.png",
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : HELPER_BIN_FILE,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add) file in use",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : HELPER_BIN_FILE,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromComplete\n",
|
||||
compareContents : "FromComplete\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/complete.png"
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
description : "Removed by precomplete (remove)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/20/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by precomplete (rmdir)",
|
||||
relPathDir : "a/b/2/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -76,7 +214,7 @@ function run_test() {
|
||||
helperBin.copyTo(fileInUseDir, TEST_DIRS[4].subDirFiles[0]);
|
||||
|
||||
// Launch an existing file so it is in use during the update
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20"];
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20"];
|
||||
let fileInUseProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
fileInUseProcess.init(fileInUseBin);
|
||||
@ -96,17 +234,15 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContains(ERR_BACKUP_DISCARD);
|
||||
|
||||
logTestInfo("testing tobedeleted directory exists");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_true(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -2,69 +2,235 @@
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File in use partial MAR file patch apply success test */
|
||||
/* File in use inside removed dir partial MAR file patch apply success test */
|
||||
|
||||
const TEST_ID = "0183";
|
||||
const MAR_IN_USE_WIN_FILE = "data/partial.mar";
|
||||
|
||||
// The files are in the same order as they are applied from the mar
|
||||
var TEST_FILES = [
|
||||
// The files are listed in the same order as they are applied from the mar's
|
||||
// update.manifest. Complete updates have remove file and rmdir directory
|
||||
// operations located in the precomplete file performed first.
|
||||
const TEST_FILES = [
|
||||
{
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "00text0",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeModified\n",
|
||||
compareContents : "Modified\n",
|
||||
description : "Only added by update.manifest for complete updates " +
|
||||
"when there is a channel change (add-cc)",
|
||||
fileName : "channel-prefs.js",
|
||||
relPathDir : "a/b/defaults/pref/",
|
||||
originalContents : "ShouldNotBeReplaced\n",
|
||||
compareContents : "ShouldNotBeReplaced\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
fileName : "00text1",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
}, {
|
||||
fileName : "10text0",
|
||||
relPathDir : "1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "00text2",
|
||||
relPathDir : "0/00/",
|
||||
originalContents : null,
|
||||
compareContents : "Added\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "20text0",
|
||||
relPathDir : "2/20/",
|
||||
originalContents : null,
|
||||
compareContents : "Added\n",
|
||||
originalFile : null,
|
||||
compareFile : null
|
||||
}, {
|
||||
fileName : "exe0.exe",
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "precomplete",
|
||||
relPathDir : "",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete_precomplete",
|
||||
compareFile : "data/partial_precomplete",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "searchpluginstext0",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0775,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng1.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png"
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Patched by update.manifest if the file exists " +
|
||||
"(patch-if)",
|
||||
fileName : "searchpluginspng0.png",
|
||||
relPathDir : "a/b/searchplugins/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions1text0",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png1.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions1png0.png",
|
||||
relPathDir : "a/b/extensions/extensions1/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Added by update.manifest if the parent directory " +
|
||||
"exists (add-if)",
|
||||
fileName : "extensions0text0",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png1.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest if the parent directory " +
|
||||
"exists (patch-if)",
|
||||
fileName : "extensions0png0.png",
|
||||
relPathDir : "a/b/extensions/extensions0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "exe0.exe",
|
||||
relPathDir : "a/b/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "0exe0.exe",
|
||||
relPathDir : "a/b/0/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0755,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text0",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeReplacedWithFromPartial\n",
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : 0644,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Patched by update.manifest (patch)",
|
||||
fileName : "00png0.png",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : "data/complete.png",
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : 0666,
|
||||
comparePerms : 0666
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20text0",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "20png0.png",
|
||||
relPathDir : "a/b/2/20/",
|
||||
originalContents : null,
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : "data/partial.png",
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Added by update.manifest (add)",
|
||||
fileName : "00text2",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : null,
|
||||
compareContents : "FromPartial\n",
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : 0644
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "10text0",
|
||||
relPathDir : "a/b/1/10/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}, {
|
||||
description : "Removed by update.manifest (remove)",
|
||||
fileName : "00text1",
|
||||
relPathDir : "a/b/0/00/",
|
||||
originalContents : "ToBeDeleted\n",
|
||||
compareContents : null,
|
||||
originalFile : null,
|
||||
compareFile : null,
|
||||
originalPerms : null,
|
||||
comparePerms : null
|
||||
}];
|
||||
|
||||
ADDITIONAL_TEST_DIRS = [
|
||||
{
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/10/",
|
||||
dirRemoved : true
|
||||
}, {
|
||||
description : "Removed by update.manifest (rmdir)",
|
||||
relPathDir : "a/b/1/",
|
||||
dirRemoved : true
|
||||
}];
|
||||
|
||||
function run_test() {
|
||||
@ -89,7 +255,7 @@ function run_test() {
|
||||
helperBin.copyTo(fileInUseDir, TEST_DIRS[2].files[0]);
|
||||
|
||||
// Launch an existing file so it is in use during the update
|
||||
let args = [getApplyDirPath(), "input", "output", "-s", "20"];
|
||||
let args = [getApplyDirPath() + "a/b/", "input", "output", "-s", "20"];
|
||||
let fileInUseProcess = AUS_Cc["@mozilla.org/process/util;1"].
|
||||
createInstance(AUS_Ci.nsIProcess);
|
||||
fileInUseProcess.init(fileInUseBin);
|
||||
@ -109,17 +275,15 @@ function doUpdate() {
|
||||
}
|
||||
|
||||
function checkUpdate() {
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
let applyToDir = getApplyDirFile();
|
||||
|
||||
logTestInfo("testing update.status should be " + STATE_SUCCEEDED);
|
||||
let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX);
|
||||
do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED);
|
||||
|
||||
checkFilesAfterUpdateSuccess();
|
||||
checkUpdateLogContains(ERR_BACKUP_DISCARD);
|
||||
|
||||
logTestInfo("testing tobedeleted directory exists");
|
||||
let toBeDeletedDir = applyToDir.clone();
|
||||
toBeDeletedDir.append("tobedeleted");
|
||||
let toBeDeletedDir = getApplyDirFile("tobedeleted", true);
|
||||
do_check_true(toBeDeletedDir.exists());
|
||||
|
||||
checkCallbackAppLog();
|
||||
|
@ -4,6 +4,11 @@
|
||||
|
||||
/* Test applying an update by staging an update and launching an application */
|
||||
|
||||
/**
|
||||
* The MAR file used for this test should not contain a version 2 update
|
||||
* manifest file (e.g. updatev2.manifest).
|
||||
*/
|
||||
|
||||
// Use a copy of the main application executable for the test to avoid main
|
||||
// executable in use errors.
|
||||
const FILE_WIN_TEST_EXE = "aus_test_app.exe";
|
||||
|
Loading…
Reference in New Issue
Block a user