services: Skip tests if OpenSCManager failed.

This should also fix failures on VMs with insufficient privileges.
This commit is contained in:
Jacek Caban 2014-04-08 11:20:27 +02:00 committed by Alexandre Julliard
parent 7b88e37839
commit 98e9e4a3b0

View file

@ -471,10 +471,14 @@ START_TEST(service)
return;
}
argc = winetest_get_mainargs(&argv);
scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL);
ok(scm_handle != NULL, "OpenSCManager failed: %u\n", GetLastError());
ok(scm_handle != NULL || GetLastError() == ERROR_ACCESS_DENIED, "OpenSCManager failed: %u\n", GetLastError());
if(!scm_handle) {
skip("OpenSCManager failed, skipping tests\n");
return;
}
argc = winetest_get_mainargs(&argv);
if(argc < 3) {
test_runner(test_service);