Hans Leidekker wrote:
These APIs were introduced with Vista.
-Hans
Changelog Implement and test PdhAddEnglishCounter{A, W} and PdhCollectQueryDataWithTime.
Hi Hans,
I was going through some test failures (already sent a patch for missing defines).
It appears that a lot of the used strings, like "System Up Time" is depending on the locale. Some Dutch tests show "Systeem ingeschakeld" instead.
Any idea how to fix that?
Another thing is that "pdh.dll" is not by default present on NT4 and below so the tests have to be changed to cope with that as well. Should I have a go at that?
Cheers,
Paul.
On Monday 30 July 2007 16:58:59 Paul Vriens wrote:
It appears that a lot of the used strings, like "System Up Time" is depending on the locale. Some Dutch tests show "Systeem ingeschakeld" instead.
Any idea how to fix that?
Another thing is that "pdh.dll" is not by default present on NT4 and below so the tests have to be changed to cope with that as well. Should I have a go at that?
I have patches pending so I'll fix these issues in one go. In fact, I had fixed some of the Vista failures already.
-Hans
Paul Vriens paul.vriens.wine@gmail.com writes:
Another thing is that "pdh.dll" is not by default present on NT4 and below so the tests have to be changed to cope with that as well. Should I have a go at that?
It may be a good idea to add generic support for that in winetest. It's a bit silly to have to manually fix all the tests that use new dlls.
Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
Another thing is that "pdh.dll" is not by default present on NT4 and below so the tests have to be changed to cope with that as well. Should I have a go at that?
It may be a good idea to add generic support for that in winetest. It's a bit silly to have to manually fix all the tests that use new dlls.
And how would you do that?
The first thing that winetest does is go through all the tests to retrieve all the subtests. If it finds a missing dll (or depending dll) we could/should catch that and not run the tests.
Is it as simple as that?
Cheers,
Paul.
Paul Vriens paul.vriens.wine@gmail.com writes:
And how would you do that?
The first thing that winetest does is go through all the tests to retrieve all the subtests. If it finds a missing dll (or depending dll) we could/should catch that and not run the tests.
Is it as simple as that?
Well, since the tests are named from the dll they are testing, I'd suggest that before running the test app 'foo_test.exe' we try a LoadLibrary("foo.dll"), and if that fails we report the whole test as skipped.
Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
And how would you do that?
The first thing that winetest does is go through all the tests to retrieve all the subtests. If it finds a missing dll (or depending dll) we could/should catch that and not run the tests.
Is it as simple as that?
Well, since the tests are named from the dll they are testing, I'd suggest that before running the test app 'foo_test.exe' we try a LoadLibrary("foo.dll"), and if that fails we report the whole test as skipped.
I'll have a look.
How do yo want to report a missing test? In the normal report file? If that's the case we should also change the dissect/gather scripts:
'dissect' should cope with the new lines in the report files. 'gather' should make up some useful info in the generated html file. We only have information about subtests if one or more complete tests are run.
If this thing works out, should we change the old tests back or use this new approach only for new (and currently failing) dll's?
Cheers,
Paul.
Paul Vriens paul.vriens.wine@gmail.com writes:
I'll have a look.
How do yo want to report a missing test? In the normal report file? If that's the case we should also change the dissect/gather scripts:
It has to be part of the report data, so yes the scripts probably need to be updated.
If this thing works out, should we change the old tests back or use this new approach only for new (and currently failing) dll's?
If it simplifies the code we can certainly change the old tests too.
Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
I'll have a look.
How do yo want to report a missing test? In the normal report file? If that's the case we should also change the dissect/gather scripts:
It has to be part of the report data, so yes the scripts probably need to be updated.
If this thing works out, should we change the old tests back or use this new approach only for new (and currently failing) dll's?
If it simplifies the code we can certainly change the old tests too.
Hi,
a patch somewhat like this?
diff --git a/programs/winetest/main.c b/programs/winetest/main.c index f743ffc..3c4846d 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -433,6 +433,24 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam) { const char *tempdir = (const char *)lParam; + char dllname[MAX_PATH]; + HMODULE dll; + + /* Check if the main dll is present on this system */ + strcpy(dllname, lpszName); + *strstr(dllname, "_TEST.EXE") = 0; + + dll = LoadLibrary(dllname); + if (!dll) { + /* Here we add some information to the results file + * that indicates that the dll is not present + * on this platform. + */ + report (R_WARNING, "dll : %s is not present", dllname); + return TRUE; + } + FreeLibrary(dll); + get_subtests( tempdir, &wine_tests[nr_of_files], lpszName ); nr_of_tests += wine_tests[nr_of_files].subtest_count; nr_of_files++;
Running this on win9x gives me 13 dll's that are not available (the R_WARNING is of course only for testing).
Cheers,
Paul.
Paul Vriens paul.vriens.wine@gmail.com writes:
a patch somewhat like this?
Yes; it may be better to do that in extract_test() since we get the test name there, it avoids hardcoding _test.exe at two different places. But the general principle is fine.
Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
a patch somewhat like this?
Yes; it may be better to do that in extract_test() since we get the test name there, it avoids hardcoding _test.exe at two different places. But the general principle is fine.
It doesn't make the code simpler though. When changing extract_test I also have to make sure that the tests are not run (--list) in get_subtests. I still have to get rid of the "_test.exe" in extract_test. I have to fiddle with test->exename and test->name etc...
Couldn't I just add a 'static const char testexec[] = "_test.exe" at the top?
Cheers,
Paul.
Paul Vriens wrote:
Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
a patch somewhat like this?
Yes; it may be better to do that in extract_test() since we get the test name there, it avoids hardcoding _test.exe at two different places. But the general principle is fine.
It doesn't make the code simpler though. When changing extract_test I also have to make sure that the tests are not run (--list) in get_subtests. I still have to get rid of the "_test.exe" in extract_test. I have to fiddle with test->exename and test->name etc...
Couldn't I just add a 'static const char testexec[] = "_test.exe" at the top?
Cheers,
Paul.
Hi again,
I have got it somewhat working (needs more testing). The attached screenshot shows the output from a win98 system (I only had d3d8 as missing in the report file for testing purposes). When you hover over the test, you will see the text as shown in the screenshot.
Cheers,
Paul.