Add support for WINETEST_INTERACTIVE. If set then tests can perform
additional explicitly interactive tests. Modify the winmm test to use WINETEST_INTERACTIVE.
This commit is contained in:
parent
bb7e49a4e2
commit
88a5cb569b
|
@ -29,14 +29,11 @@
|
||||||
* Note that in most of this test we may get MMSYSERR_BADDEVICEID errors
|
* Note that in most of this test we may get MMSYSERR_BADDEVICEID errors
|
||||||
* at about any time if the user starts another application that uses the
|
* at about any time if the user starts another application that uses the
|
||||||
* sound device. So we should not report these as test failures.
|
* sound device. So we should not report these as test failures.
|
||||||
*/
|
*
|
||||||
|
* This test can play a test tone. But this only makes sense if someone
|
||||||
/* This test can play a test sound. But this only makes sense if someone
|
|
||||||
* is going to carefully listen to it, and would only bother everyone else.
|
* is going to carefully listen to it, and would only bother everyone else.
|
||||||
* So to play the test sound you have to pass the 'play' parameter:
|
* So this is only done if the test is being run in interactive mode.
|
||||||
* winmm_test wave play
|
|
||||||
*/
|
*/
|
||||||
static int play_la;
|
|
||||||
|
|
||||||
static const unsigned int win_formats[][4]={
|
static const unsigned int win_formats[][4]={
|
||||||
{WAVE_FORMAT_1M08, 11025, 8, 1},
|
{WAVE_FORMAT_1M08, 11025, 8, 1},
|
||||||
|
@ -149,7 +146,7 @@ static void wave_out_test_deviceOut(int device, int format, DWORD flags)
|
||||||
ok(rc==MMSYSERR_NOERROR,
|
ok(rc==MMSYSERR_NOERROR,
|
||||||
"waveOutPrepareHeader: device=%d rc=%d\n",device,rc);
|
"waveOutPrepareHeader: device=%d rc=%d\n",device,rc);
|
||||||
|
|
||||||
if (play_la && rc==MMSYSERR_NOERROR) {
|
if (winetest_interactive && rc==MMSYSERR_NOERROR) {
|
||||||
trace("Playing 440Hz LA at %ldx%2dx%d %04lx\n",
|
trace("Playing 440Hz LA at %ldx%2dx%d %04lx\n",
|
||||||
wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels,flags);
|
wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels,flags);
|
||||||
rc=waveOutSetVolume(wout,0x20002000);
|
rc=waveOutSetVolume(wout,0x20002000);
|
||||||
|
@ -263,10 +260,5 @@ static void wave_out_tests()
|
||||||
|
|
||||||
START_TEST(wave)
|
START_TEST(wave)
|
||||||
{
|
{
|
||||||
int argc;
|
|
||||||
char** argv;
|
|
||||||
argc = winetest_get_mainargs(&argv);
|
|
||||||
play_la=(argc >= 3 && strcmp(argv[2],"play")==0);
|
|
||||||
|
|
||||||
wave_out_tests();
|
wave_out_tests();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
/* debug level */
|
/* debug level */
|
||||||
extern int winetest_debug;
|
extern int winetest_debug;
|
||||||
|
|
||||||
|
/* running in interactive mode? */
|
||||||
|
extern int winetest_interactive;
|
||||||
|
|
||||||
/* current platform */
|
/* current platform */
|
||||||
extern const char *winetest_platform;
|
extern const char *winetest_platform;
|
||||||
|
|
||||||
|
@ -74,6 +77,9 @@ extern void winetest_trace( const char *msg, ... );
|
||||||
/* debug level */
|
/* debug level */
|
||||||
int winetest_debug = 1;
|
int winetest_debug = 1;
|
||||||
|
|
||||||
|
/* interactive mode? */
|
||||||
|
int winetest_interactive = 0;
|
||||||
|
|
||||||
/* current platform */
|
/* current platform */
|
||||||
const char *winetest_platform = "windows";
|
const char *winetest_platform = "windows";
|
||||||
|
|
||||||
|
@ -314,6 +320,7 @@ int main( int argc, char **argv )
|
||||||
|
|
||||||
if ((p = getenv( "WINETEST_PLATFORM" ))) winetest_platform = p;
|
if ((p = getenv( "WINETEST_PLATFORM" ))) winetest_platform = p;
|
||||||
if ((p = getenv( "WINETEST_DEBUG" ))) winetest_debug = atoi(p);
|
if ((p = getenv( "WINETEST_DEBUG" ))) winetest_debug = atoi(p);
|
||||||
|
if ((p = getenv( "WINETEST_INTERACTIVE" ))) winetest_interactive = atoi(p);
|
||||||
if ((p = getenv( "WINETEST_REPORT_SUCCESS"))) report_success = atoi(p);
|
if ((p = getenv( "WINETEST_REPORT_SUCCESS"))) report_success = atoi(p);
|
||||||
if (!argv[1]) usage( argv[0] );
|
if (!argv[1]) usage( argv[0] );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue