Make dlls-kernel-tests-file.c work on Windows 95 and XP.
Jakob Eriksson
jakov at vmlinux.org
Mon Apr 26 17:56:48 CDT 2004
Alexandre Julliard wrote:
>Jakob Eriksson <jakov at vmlinux.org> writes:
>
>
>
>>+static int test_win9x_based()
>>+{
>>+ OSVERSIONINFOEX ver;
>>+
>>+ ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
>>+ ok( GetVersionEx ((OSVERSIONINFO *) &ver), " --- Can't get OS version.\n" );
>>+ if ((4 == ver.dwMajorVersion && 0 == ver.dwMinorVersion && 1381 == ver.dwBuildNumber)
>>+ || ver.dwMajorVersion >= 5)
>>+ {
>>+ return 0;
>>+ }
>>+
>>+ return 1;
>>
>>
>
>You should not do version checks in tests, the checks should be based
>on the features we are testing. Otherwise the results are going to
>depend on the Windows version that Wine is configured for, which is
>the wrong thing to do since the behavior of the Wine code in that case
>does not depend on the version.
>
>
>
I just thought hard about winetest.exe... how about this approach:
if (running_under_wine || !win9x_based)
{
/* Do stuff that would crash Windows 9x. */
/* Could also be stuff that Wine has not yet implemented */
todo_wine { stuff(); }
}
Pros:
* Under Wine, run every test.
* Easy skip of tests under platforms we know crashes or hangs winetest.exe.
* If I am allowed to check for platform, it is easier to avoid crashing
winetest.exe. (I.e. how do I check for capabilities on something that
hangs
winetest.exe when probed for capabilities?)
Cons:
Could be easy to be lazy - for instance there can be different
versions of DLLs under Windows 98, some more capable than others.
This scheme would invite to not test for capabilities.
I just want do deploy winetest.exe on as many Win32 platforms as possible
without having the app crashing all the time... Maybe that desire is leading
me to cut corners where I shouldn't?
regards,
Jakob
More information about the wine-devel
mailing list