Hi,
I've been busy trying to come up with a solution and attached you will find 2 patches.
One for 'winetest that will make sure we have specific output for dll's that are not on the system. I have made the output as close to normal test output as possible, so we don't have to patch dissect (the tool that dissects the reports).
One for 'gather', the tool that translates the reports into a nice html page.
There will be (in contrast with the other skip's) no visibility in the group reports yet. I'll have to figure out how to do that nicely. For now I'm assuming that if one system doesn't have a dll, all the others (same platform) don't have it at well (I know bad assumption and it will be dealt with in next revisions).
(I do have another version of 'gather' which deals with the group reports but shows the whole test for all systems (same platform of course) if one or more systems have a missing dll).
If we pursue this then we probably also need to change old tests as that will mean we can strip a lot of code from the tests.
Comments/remarks etc.. are welcome.
Cheers,
Paul.
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++;
Index: gather =================================================================== RCS file: /home/wine/tools/winetest/gather,v retrieving revision 1.20 diff -u -r1.20 gather --- gather 13 Mar 2007 16:10:46 -0000 1.20 +++ gather 1 Aug 2007 16:27:19 -0000 @@ -96,6 +96,9 @@ my ($digest, $unit, $test, $count, $todo, $error, $skipped, $source, $rev) = split; my $testname = "$unit:$test"; + if ($test =~ /_dll_missing/) { + $testref->{dll}->{$unit} = "missing"; + } $testref->{results}->{$testname} = [$count, $todo, $error, $skipped]; $alltests{$testname} = "http://cvs.winehq.org/cvsweb/wine/$source" . ($rev ne "-"?"#rev$rev":"") unless exists $alltests{$testname}; @@ -199,7 +202,18 @@ my ($test, $testname, $groupname) = @_;
if (!exists $test->{results}->{$testname}) { - print OUT " <td class="note">.</td>\n"; + my ($unit1, $test1) = split(/:/, $testname); + my $dll = $test->{dll}->{$unit1}; + if ((defined $dll) && ($dll eq "missing")) { + print OUT <<"EOF"; + <td class="skip_pass"><a + title="No tests run as $unit1.dll is not present on this system" + onMouseOver="No tests run as $unit1.dll is not present on this system" + >0</a></td> +EOF + } else { + print OUT " <td class="note">.</td>\n"; + } } else { my $file = "$test->{dir}/$testname.txt"; my ($count, $todo, $error, $skipped) = @{$test->{results}->{$testname}}; @@ -223,6 +237,8 @@ }
foreach my $testname (sort keys %alltests) { + next unless $testname !~ /_dll_missing/; + print OUT <<"EOF"; <tr> <td class="test"> @@ -290,6 +306,7 @@ <tbody onDblClick="clone();"> EOF foreach my $testname (sort keys %alltests) { # skip identical + next unless $testname !~ /_dll_missing/; my $digest = $group->{digests}->{$testname}; next unless defined $digest && $digest eq "differ"; print OUT <<"EOF";