mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[MSI_WINETEST] Sync with Wine Staging 1.9.12. CORE-11266
svn path=/trunk/; revision=71668
This commit is contained in:
parent
47da43b8e1
commit
94c119a9c9
4 changed files with 59 additions and 43 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
#define _WIN32_MSI 300
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <msiquery.h>
|
||||
|
@ -28,6 +29,9 @@
|
|||
#include <msi.h>
|
||||
#include <fci.h>
|
||||
#include <srrestoreptapi.h>
|
||||
#include <wtypes.h>
|
||||
#include <shellapi.h>
|
||||
#include <winsvc.h>
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
|
@ -230,7 +234,7 @@ static const char service_install2_dat[] =
|
|||
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
|
||||
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
|
||||
"ServiceInstall\tServiceInstall\n"
|
||||
"TestService\tTestService\tTestService\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\n"
|
||||
"TestService\tTestService\tTestService\t2\t3\t32768\t\t\tTestService\t\t\tservice_comp\t\n"
|
||||
"TestService4\tTestService4\tTestService4\t2\t3\t0\t\t\tTestService4\t\t\tservice_comp3\t\n";
|
||||
|
||||
static const char service_control_dat[] =
|
||||
|
@ -5423,6 +5427,30 @@ static void test_start_stop_services(void)
|
|||
DeleteFileA(msifile);
|
||||
}
|
||||
|
||||
static void delete_TestService(void)
|
||||
{
|
||||
BOOL ret;
|
||||
SC_HANDLE manager, service;
|
||||
|
||||
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
|
||||
ok(manager != NULL, "can't open service manager\n");
|
||||
if (!manager)
|
||||
return;
|
||||
|
||||
service = OpenServiceA(manager, "TestService", GENERIC_ALL);
|
||||
ok(service != NULL, "TestService doesn't exist\n");
|
||||
|
||||
if (service)
|
||||
{
|
||||
ret = DeleteService( service );
|
||||
ok( ret, "failed to delete service %u\n", GetLastError() );
|
||||
|
||||
CloseServiceHandle(service);
|
||||
}
|
||||
CloseServiceHandle(manager);
|
||||
|
||||
}
|
||||
|
||||
static void test_delete_services(void)
|
||||
{
|
||||
UINT r;
|
||||
|
@ -5488,6 +5516,7 @@ static void test_delete_services(void)
|
|||
ok(delete_pf("msitest", FALSE), "Directory not created\n");
|
||||
|
||||
error:
|
||||
delete_TestService();
|
||||
delete_test_files();
|
||||
DeleteFileA(msifile);
|
||||
}
|
||||
|
@ -5496,7 +5525,9 @@ static void test_install_services(void)
|
|||
{
|
||||
UINT r;
|
||||
SC_HANDLE manager, service;
|
||||
BOOL ret;
|
||||
LONG res;
|
||||
HKEY hKey;
|
||||
DWORD err_control, err_controlsize, err_controltype;
|
||||
|
||||
if (is_process_limited())
|
||||
{
|
||||
|
@ -5529,6 +5560,19 @@ static void test_install_services(void)
|
|||
ok(service == NULL, "TestService4 installed\n");
|
||||
CloseServiceHandle(manager);
|
||||
|
||||
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\TestService", &hKey);
|
||||
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||
|
||||
if (res == ERROR_SUCCESS)
|
||||
{
|
||||
err_control = 0xBEEF;
|
||||
err_controltype = REG_DWORD;
|
||||
err_controlsize = sizeof(err_control);
|
||||
res = RegQueryValueExA(hKey, "ErrorControl", NULL, &err_controltype, (LPBYTE)&err_control, &err_controlsize);
|
||||
ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got %u\n", err_control);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
r = MsiInstallProductA(msifile, "REMOVE=ALL");
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
||||
|
||||
|
@ -5546,20 +5590,8 @@ static void test_install_services(void)
|
|||
ok(delete_pf("msitest\\service2.exe", TRUE), "File not installed\n");
|
||||
ok(delete_pf("msitest", FALSE), "Directory not created\n");
|
||||
|
||||
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
|
||||
ok(manager != NULL, "can't open service manager\n");
|
||||
if (!manager) goto error;
|
||||
|
||||
service = OpenServiceA(manager, "TestService", GENERIC_ALL);
|
||||
ok(service != NULL, "TestService doesn't exist\n");
|
||||
|
||||
ret = DeleteService( service );
|
||||
ok( ret, "failed to delete service %u\n", GetLastError() );
|
||||
|
||||
CloseServiceHandle(service);
|
||||
CloseServiceHandle(manager);
|
||||
|
||||
error:
|
||||
delete_TestService();
|
||||
delete_test_files();
|
||||
DeleteFileA(msifile);
|
||||
}
|
||||
|
@ -5882,7 +5914,7 @@ static void test_publish_components(void)
|
|||
size = 0;
|
||||
r = MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
|
||||
"english.txt", INSTALLMODE_DEFAULT, NULL, &size);
|
||||
ok(r == ERROR_SUCCESS, "MsiProvideQualifiedCompontent returned %d\n", r);
|
||||
ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
|
||||
|
||||
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
|
||||
ok(res == ERROR_SUCCESS, "components key not created %d\n", res);
|
||||
|
@ -5908,7 +5940,7 @@ static void test_publish_components(void)
|
|||
size = 0;
|
||||
r = MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
|
||||
"english.txt", INSTALLMODE_DEFAULT, NULL, &size);
|
||||
ok(r == ERROR_SUCCESS, "MsiProvideQualifiedCompontent returned %d\n", r);
|
||||
ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
|
||||
|
||||
if (pRegDeleteKeyExA)
|
||||
res = pRegDeleteKeyExA(HKEY_LOCAL_MACHINE, keypath2, KEY_WOW64_64KEY, 0);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <msidefs.h>
|
||||
#include <msi.h>
|
||||
#include <fci.h>
|
||||
#include <oaidl.h>
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
|
@ -600,10 +601,7 @@ static void test_dispid(void)
|
|||
while (ptr->name)
|
||||
{
|
||||
dispid = get_dispid(pInstaller, ptr->name);
|
||||
if (ptr->todo)
|
||||
todo_wine
|
||||
ok(dispid == ptr->did, "%s: expected %d, got %d\n", ptr->name, ptr->did, dispid);
|
||||
else
|
||||
todo_wine_if (ptr->todo)
|
||||
ok(dispid == ptr->did, "%s: expected %d, got %d\n", ptr->name, ptr->did, dispid);
|
||||
ptr++;
|
||||
}
|
||||
|
@ -884,9 +882,7 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA
|
|||
|
||||
if (hr == S_OK)
|
||||
{
|
||||
if (_invoke_todo_vtResult) todo_wine
|
||||
ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected %d\n", V_VT(pVarResult), vtResult);
|
||||
else
|
||||
todo_wine_if (_invoke_todo_vtResult)
|
||||
ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected %d\n", V_VT(pVarResult), vtResult);
|
||||
if (vtResult != VT_EMPTY)
|
||||
{
|
||||
|
|
|
@ -23,12 +23,11 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <objidl.h>
|
||||
#include <msi.h>
|
||||
#include <msidefs.h>
|
||||
#include <msiquery.h>
|
||||
|
||||
#include <objidl.h>
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
static const char *msifile = "winetest-db.msi";
|
||||
|
@ -8069,7 +8068,7 @@ static void test_dbmerge(void)
|
|||
r = run_query(href, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
/* column sting types don't match exactly */
|
||||
/* column string types don't match exactly */
|
||||
r = MsiDatabaseMergeA(hdb, href, "MergeErrors");
|
||||
ok(r == ERROR_SUCCESS,
|
||||
"Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
|
|
@ -2482,7 +2482,7 @@ static void test_msipackage(void)
|
|||
r = MsiOpenDatabaseW(msifileW, MSIDBOPEN_CREATE, &hdb);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
/* database exists, but is emtpy */
|
||||
/* database exists, but is empty */
|
||||
sprintf(name, "#%d", hdb);
|
||||
r = MsiOpenPackageA(name, &hpack);
|
||||
ok(r == ERROR_INSTALL_PACKAGE_INVALID,
|
||||
|
@ -2638,19 +2638,14 @@ static void test_feature_states( UINT line, MSIHANDLE package, const char *featu
|
|||
{
|
||||
ok( state == expected_state, "%u: expected state %d got %d\n",
|
||||
line, expected_state, state );
|
||||
if (todo) todo_wine
|
||||
ok( action == expected_action, "%u: expected action %d got %d\n",
|
||||
line, expected_action, action );
|
||||
else
|
||||
todo_wine_if (todo)
|
||||
ok( action == expected_action, "%u: expected action %d got %d\n",
|
||||
line, expected_action, action );
|
||||
}
|
||||
else
|
||||
{
|
||||
ok( state == 0xdeadbee, "%u: expected state 0xdeadbee got %d\n", line, state );
|
||||
if (todo) todo_wine
|
||||
ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n", line, action );
|
||||
else
|
||||
todo_wine_if (todo)
|
||||
ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n", line, action );
|
||||
|
||||
}
|
||||
|
@ -2669,10 +2664,7 @@ static void test_component_states( UINT line, MSIHANDLE package, const char *com
|
|||
{
|
||||
ok( state == expected_state, "%u: expected state %d got %d\n",
|
||||
line, expected_state, state );
|
||||
if (todo) todo_wine
|
||||
ok( action == expected_action, "%u: expected action %d got %d\n",
|
||||
line, expected_action, action );
|
||||
else
|
||||
todo_wine_if (todo)
|
||||
ok( action == expected_action, "%u: expected action %d got %d\n",
|
||||
line, expected_action, action );
|
||||
}
|
||||
|
@ -2680,10 +2672,7 @@ static void test_component_states( UINT line, MSIHANDLE package, const char *com
|
|||
{
|
||||
ok( state == 0xdeadbee, "%u: expected state 0xdeadbee got %d\n",
|
||||
line, state );
|
||||
if (todo) todo_wine
|
||||
ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
|
||||
line, action );
|
||||
else
|
||||
todo_wine_if (todo)
|
||||
ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
|
||||
line, action );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue