dsound/tests: Trace the number of tested DirectSound drivers.
Francois Gouget
fgouget at free.fr
Sun Aug 12 17:16:13 CDT 2012
This way it's immediately clear why the DirectSound tests were 'skipped' on some test VMs.
---
dlls/dsound/tests/ds3d.c | 4 ++++
dlls/dsound/tests/ds3d8.c | 4 ++++
dlls/dsound/tests/propset.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c
index dc25f25..36e59c9 100644
--- a/dlls/dsound/tests/ds3d.c
+++ b/dlls/dsound/tests/ds3d.c
@@ -1258,11 +1258,14 @@ return DSERR_GENERIC;
return rc;
}
+static unsigned driver_count = 0;
+
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
LPCSTR lpcstrModule, LPVOID lpContext)
{
HRESULT rc;
trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
+ driver_count++;
rc = test_for_driver(lpGuid);
if (rc == DSERR_NODRIVER) {
@@ -1309,6 +1312,7 @@ static void ds3d_tests(void)
HRESULT rc;
rc=pDirectSoundEnumerateA(&dsenum_callback,NULL);
ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc);
+ trace("tested %u DirectSound drivers\n", driver_count);
}
START_TEST(ds3d)
diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c
index e90057d..c432d35 100644
--- a/dlls/dsound/tests/ds3d8.c
+++ b/dlls/dsound/tests/ds3d8.c
@@ -1081,11 +1081,14 @@ return DSERR_GENERIC;
return rc;
}
+static unsigned driver_count = 0;
+
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
LPCSTR lpcstrModule, LPVOID lpContext)
{
HRESULT rc;
trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
+ driver_count++;
rc = test_for_driver8(lpGuid);
if (rc == DSERR_NODRIVER) {
@@ -1132,6 +1135,7 @@ static void ds3d8_tests(void)
HRESULT rc;
rc=pDirectSoundEnumerateA(&dsenum_callback,NULL);
ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc);
+ trace("tested %u DirectSound drivers\n", driver_count);
}
START_TEST(ds3d8)
diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c
index e85924d..6324a3f 100644
--- a/dlls/dsound/tests/propset.c
+++ b/dlls/dsound/tests/propset.c
@@ -553,6 +553,8 @@ static void propset_private_tests(void)
IKsPropertySet_Release(pps);
}
+static unsigned driver_count = 0;
+
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
LPCSTR lpcstrModule, LPVOID lpContext)
{
@@ -564,6 +566,7 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
int ref;
trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
+ driver_count++;
rc=pDirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
@@ -710,6 +713,7 @@ static void propset_buffer_tests(void)
HRESULT rc;
rc=pDirectSoundEnumerateA(&dsenum_callback,NULL);
ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc);
+ trace("tested %u DirectSound drivers\n", driver_count);
}
START_TEST(propset)
--
1.7.10.4
More information about the wine-patches
mailing list