setupapi/tests: Skip some tests if we don't have enough rights.

This commit is contained in:
Paul Vriens 2009-01-07 11:05:24 +01:00 committed by Alexandre Julliard
parent b91f4a3dae
commit c89617e067
1 changed files with 12 additions and 0 deletions

View File

@ -288,6 +288,13 @@ static void test_install_svc_from(void)
infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL);
SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
{
skip("Not enough rights to install the service\n");
SetupCloseInfFile(infhandle);
DeleteFile(inffile);
return;
}
ok(ret, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
@ -344,6 +351,11 @@ static void test_driver_install(void)
skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
return;
}
else if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED))
{
skip("Not enough rights to install the service\n");
return;
}
CloseServiceHandle(scm_handle);
/* Place where we expect the driver to be installed */