Commit 88a5cb56 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Add support for WINETEST_INTERACTIVE. If set then tests can perform

additional explicitly interactive tests. Modify the winmm test to use WINETEST_INTERACTIVE.
parent bb7e49a4
......@@ -29,14 +29,11 @@
* 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
* sound device. So we should not report these as test failures.
*/
/* This test can play a test sound. But this only makes sense if someone
*
* This test can play a test tone. But this only makes sense if someone
* 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:
* winmm_test wave play
* So this is only done if the test is being run in interactive mode.
*/
static int play_la;
static const unsigned int win_formats[][4]={
{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,
"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",
wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels,flags);
rc=waveOutSetVolume(wout,0x20002000);
......@@ -263,10 +260,5 @@ static void wave_out_tests()
START_TEST(wave)
{
int argc;
char** argv;
argc = winetest_get_mainargs(&argv);
play_la=(argc >= 3 && strcmp(argv[2],"play")==0);
wave_out_tests();
}
......@@ -27,6 +27,9 @@
/* debug level */
extern int winetest_debug;
/* running in interactive mode? */
extern int winetest_interactive;
/* current platform */
extern const char *winetest_platform;
......@@ -74,6 +77,9 @@ extern void winetest_trace( const char *msg, ... );
/* debug level */
int winetest_debug = 1;
/* interactive mode? */
int winetest_interactive = 0;
/* current platform */
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_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 (!argv[1]) usage( argv[0] );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment