Hans Leidekker : setupapi/tests: Skip InstallHinfSection tests if the user doesn't have admin rights.
Alexandre Julliard
julliard at winehq.org
Tue Dec 20 16:23:24 CST 2016
Module: wine
Branch: master
Commit: 53b7a36319895f929e3dcdc0433cc2e55020dd34
URL: http://source.winehq.org/git/wine.git/?a=commit;h=53b7a36319895f929e3dcdc0433cc2e55020dd34
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Dec 20 12:08:35 2016 +0100
setupapi/tests: Skip InstallHinfSection tests if the user doesn't have admin rights.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/setupapi/tests/install.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c
index 5015e31..558453c 100644
--- a/dlls/setupapi/tests/install.c
+++ b/dlls/setupapi/tests/install.c
@@ -455,6 +455,14 @@ static void test_profile_items(void)
goto cleanup;
}
+ snprintf(path, MAX_PATH, "%s\\TestDir", commonprogs);
+ if (!CreateDirectoryA(path, NULL) && GetLastError() == ERROR_ACCESS_DENIED)
+ {
+ skip("need admin rights\n");
+ return;
+ }
+ RemoveDirectoryA(path);
+
create_inf_file(inffile, inf);
sprintf(path, "%s\\%s", CURR_DIR, inffile);
run_cmdline("DefaultInstall", 128, path);
More information about the wine-cvs
mailing list