Module: wine Branch: master Commit: c89617e06700108c4f807c98055d5d5e2e938486 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c89617e06700108c4f807c9805...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Wed Jan 7 11:05:24 2009 +0100
setupapi/tests: Skip some tests if we don't have enough rights.
---
dlls/setupapi/tests/install.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index 981dce3..4936923 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -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 */