Author: akhaldi
Date: Sun Jul 19 23:04:56 2015
New Revision: 68462
URL:
http://svn.reactos.org/svn/reactos?rev=68462&view=rev
Log:
[MSI_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/rostests/winetests/msi/db.c
trunk/rostests/winetests/msi/install.c
trunk/rostests/winetests/msi/patch.c
trunk/rostests/winetests/msi/source.c
Modified: trunk/rostests/winetests/msi/db.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/db.c?rev=68…
==============================================================================
--- trunk/rostests/winetests/msi/db.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/db.c [iso-8859-1] Sun Jul 19 23:04:56 2015
@@ -2771,7 +2771,7 @@
DeleteFileA(msifile);
}
-#define MY_NVIEWS 4000 /* Largest installer I've seen uses < 2k */
+#define MY_NVIEWS 4000 /* Largest installer I've seen uses < 2000 */
static void test_handle_limit(void)
{
int i;
@@ -3190,7 +3190,8 @@
r = MsiDatabaseApplyTransformA( hdb, mstfile, 0 );
ok( r == ERROR_SUCCESS, "return code %d, should be ERROR_SUCCESS\n", r );
- MsiDatabaseCommit( hdb );
+ r = MsiDatabaseCommit( hdb );
+ ok( r == ERROR_SUCCESS , "Failed to commit database\n" );
/* check new values */
hrec = 0;
Modified: trunk/rostests/winetests/msi/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/install.c?r…
==============================================================================
--- trunk/rostests/winetests/msi/install.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/install.c [iso-8859-1] Sun Jul 19 23:04:56 2015
@@ -2930,6 +2930,7 @@
if (r == ERROR_INSTALL_PACKAGE_REJECTED)
{
skip("Not enough rights to perform tests\n");
+ goto error;
}
else
{
@@ -3012,6 +3013,7 @@
ok(delete_pf("msitest", FALSE), "Directory not created\n");
}
+error:
delete_cab_files();
DeleteFileA(msifile);
}
@@ -3155,7 +3157,7 @@
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL);
- ok(r == ERROR_SUCCESS || broken(r == ERROR_INSTALL_FAILURE), "Expected
ERROR_SUCCESS, got %u\n", r);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
if (r == ERROR_SUCCESS)
{
ok(delete_pf("msitest\\augustus", TRUE), "File not
installed\n");
@@ -3177,7 +3179,7 @@
MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
r = MsiInstallProductA(msifile, NULL);
- ok(r == ERROR_SUCCESS || broken(r == ERROR_INSTALL_FAILURE), "Expected
ERROR_SUCCESS, got %u\n", r);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
if (r == ERROR_SUCCESS)
{
ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but
execute-only was requested.\n");
@@ -4510,6 +4512,11 @@
skip("Not enough rights to perform tests\n");
goto error;
}
+ else if (r == ERROR_INSTALL_FAILURE)
+ {
+ win_skip("broken result\n");
+ goto error;
+ }
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
ok(pf_exists("msitest\\helium"), "File not installed\n");
@@ -5078,7 +5085,7 @@
else
{
fileret = DeleteFileA(src);
- ok(fileret, "Failed to delete file %s (%u)\n", src,
GetLastError());
+ ok(fileret || broken(!fileret) /* win2k3 */, "Failed to delete file %s
(%u)\n", src, GetLastError());
}
}
@@ -5888,7 +5895,8 @@
lstrcatA(log_file, "\\msitest.log");
MsiEnableLogA(INSTALLLOGMODE_FATALEXIT, log_file, 0);
- test_MsiInstallProduct();
+ if (pSRSetRestorePointA) /* test has side-effects on win2k3 that cause failures in
following tests */
+ test_MsiInstallProduct();
test_MsiSetComponentState();
test_packagecoltypes();
test_continuouscabs();
Modified: trunk/rostests/winetests/msi/patch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/patch.c?rev…
==============================================================================
--- trunk/rostests/winetests/msi/patch.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/patch.c [iso-8859-1] Sun Jul 19 23:04:56 2015
@@ -968,6 +968,29 @@
return r;
}
+static UINT find_entryW( MSIHANDLE hdb, const WCHAR *table, const WCHAR *entry )
+{
+ static const WCHAR fmt[] =
+ {'S','E','L','E','C','T','
','*',' ','F','R','O','M','
','`','%','s','`',' ',
+ 'W','H','E','R','E','
','`','N','a','m','e','`','
','=','
','\'','%','s','\'',0};
+ WCHAR query[0x100];
+ MSIHANDLE hview, hrec;
+ UINT r;
+
+ wsprintfW( query, fmt, table, entry );
+ r = MsiDatabaseOpenViewW( hdb, query, &hview );
+ ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+ r = MsiViewExecute( hview, 0 );
+ ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+ r = MsiViewFetch( hview, &hrec );
+ MsiViewClose( hview );
+ MsiCloseHandle( hview );
+ MsiCloseHandle( hrec );
+ return r;
+}
+
static INT get_integer( MSIHANDLE hdb, UINT field, const char *query)
{
UINT r;
@@ -1031,11 +1054,13 @@
static void test_system_tables( void )
{
+ static const char patchsource[] =
"MSPSRC0F96CDC04CDF4304B2837B9264889EF7";
+ static const WCHAR streamsW[] =
{'_','S','t','r','e','a','m','s',0};
+ static const WCHAR CAB_msitest_encodedW[] =
{0x3a8c,0x47cb,0x45b0,0x45ec,0x45a8,0x4837,0};
UINT r;
char *cr;
const char *query;
MSIHANDLE hproduct, hdb, hview, hrec;
- static const char patchsource[] =
"MSPSRC0F96CDC04CDF4304B2837B9264889EF7";
if (!pMsiApplyPatchA)
{
@@ -1136,6 +1161,9 @@
r = find_entry( hdb, "_Streams", "\5SummaryInformation" );
ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r );
+
+ r = find_entryW( hdb, streamsW, CAB_msitest_encodedW );
+ ok( r == ERROR_NO_MORE_ITEMS, "failed to find entry %u\n", r );
query = "SELECT * FROM `_Storages`";
r = MsiDatabaseOpenViewA( hdb, query, &hview );
Modified: trunk/rostests/winetests/msi/source.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/source.c?re…
==============================================================================
--- trunk/rostests/winetests/msi/source.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/source.c [iso-8859-1] Sun Jul 19 23:04:56 2015
@@ -2887,6 +2887,24 @@
ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got
\"%s\"\n", prompt);
+ /* pcchVolumeLabel, szDiskPrompt and pcchDiskPrompt are NULL */
+ id = 0;
+ lstrcpyA(label, "aaa");
+ r = pMsiSourceListEnumMediaDisksA(prodcode, usersid,
MSIINSTALLCONTEXT_USERUNMANAGED,
+ MSICODE_PRODUCT, 0, &id, label, NULL,
+ NULL, NULL);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got
\"%s\"\n", label);
+ ok(id == 1, "Expected 1, got %d\n", id);
+
+ /* szVolumeLabel, pcchVolumeLabel, szDiskPrompt and pcchDiskPrompt are NULL */
+ id = 0;
+ r = pMsiSourceListEnumMediaDisksA(prodcode, usersid,
MSIINSTALLCONTEXT_USERUNMANAGED,
+ MSICODE_PRODUCT, 0, &id, NULL, NULL,
+ NULL, NULL);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(id == 1, "Expected 1, got %d\n", id);
+
/* pcchVolumeLabel is exactly 5 */
lstrcpyA(label, "aaa");
labelsz = 5;