[PATCH 1/2] advpack/tests: Avoid test failures without high access rights

Detlef Riekenberg wine.dev at web.de
Sun Aug 5 08:55:20 CDT 2012


On vista and above, for an account it's not enough to be a member
of the administrator group to install software.

--
By by ... Detlef
---
 dlls/advpack/tests/Makefile.in |    2 +-
 dlls/advpack/tests/install.c   |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/advpack/tests/Makefile.in b/dlls/advpack/tests/Makefile.in
index 115f180..af9d2ee 100644
--- a/dlls/advpack/tests/Makefile.in
+++ b/dlls/advpack/tests/Makefile.in
@@ -1,5 +1,5 @@
 TESTDLL   = advpack.dll
-IMPORTS   = cabinet advapi32
+IMPORTS   = cabinet advapi32 advpack
 
 C_SRCS = \
 	advpack.c \
diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c
index 6a4d8d6..4876d71 100644
--- a/dlls/advpack/tests/install.c
+++ b/dlls/advpack/tests/install.c
@@ -259,6 +259,12 @@ START_TEST(install)
     if (!init_function_pointers())
         return;
 
+    if (!IsNTAdmin(0, NULL))
+    {
+        skip("Most tests need admin rights\n");
+        return;
+    }
+
     GetCurrentDirectoryA(MAX_PATH, prev_path);
     GetTempPath(MAX_PATH, temp_path);
     SetCurrentDirectoryA(temp_path);
-- 
1.7.5.4




More information about the wine-patches mailing list