Paul Vriens : dnsapi/tests: Load dnsapi dynamically and use skip.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 12 08:28:32 CDT 2007


Module: wine
Branch: master
Commit: 034765e1000602f0b14dc12a267eb194ee974517
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=034765e1000602f0b14dc12a267eb194ee974517

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Mon Mar 12 09:16:06 2007 +0100

dnsapi/tests: Load dnsapi dynamically and use skip.

---

 dlls/dnsapi/tests/Makefile.in |    2 +-
 dlls/dnsapi/tests/name.c      |    8 +++++++-
 dlls/dnsapi/tests/record.c    |    8 +++++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/dlls/dnsapi/tests/Makefile.in b/dlls/dnsapi/tests/Makefile.in
index 25edc4a..5c86a66 100644
--- a/dlls/dnsapi/tests/Makefile.in
+++ b/dlls/dnsapi/tests/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 TESTDLL   = dnsapi.dll
-IMPORTS   = dnsapi kernel32
+IMPORTS   = kernel32
 
 CTESTS = \
 	name.c \
diff --git a/dlls/dnsapi/tests/name.c b/dlls/dnsapi/tests/name.c
index d59e19e..5d74bdd 100644
--- a/dlls/dnsapi/tests/name.c
+++ b/dlls/dnsapi/tests/name.c
@@ -219,10 +219,16 @@ static void test_DnsNameCompare_A( void )
 START_TEST(name)
 {
     dnsapi = LoadLibraryA( "dnsapi.dll" );
-    if (!dnsapi) return;
+    if (!dnsapi)
+    {
+        /* Doesn't exist before W2K */
+        skip("dnsapi.dll cannot be loaded\n");
+        return;
+    }
 
     if (!init_function_ptrs())
     {
+        skip("Needed functions are not available\n");
         FreeLibrary( dnsapi );
         return;
     }
diff --git a/dlls/dnsapi/tests/record.c b/dlls/dnsapi/tests/record.c
index 7da1c29..ee7df92 100644
--- a/dlls/dnsapi/tests/record.c
+++ b/dlls/dnsapi/tests/record.c
@@ -150,10 +150,16 @@ static void test_DnsRecordSetDetach( void )
 START_TEST(record)
 {
     dnsapi = LoadLibraryA( "dnsapi.dll" );
-    if (!dnsapi) return;
+    if (!dnsapi)
+    {
+        /* Doesn't exist before W2K */
+        skip("dnsapi.dll cannot be loaded\n");
+        return;
+    }
 
     if (!init_function_ptrs())
     {
+        skip("Needed functions are not available\n");
         FreeLibrary( dnsapi );
         return;
     }




More information about the wine-cvs mailing list