On 27 November 2014 at 10:47, Stefan Dösinger stefandoesinger@gmail.com wrote:
For what it's worth, I still plan to merge device.c and visual.c at some point in the future,
I don't like this idea. I prefer to be able to run the visual tests on Windows without the mode setting tests in device.c messing up my screen and taking forever on my slow monitor. I'm also not a fan of 30k lines of code in a file, although that doesn't mean we have to go to the opposite extreme and add hundreds of 50-line .java files.
Actually, new tests should in general go into device.c although we haven't really been enforcing that, in part because we currently don't have the get_surface_color() / getPixelColor() helpers in device.c. Merging would help with duplication of helper functions, and also be more consistent with the ddraw, d3d10core and d2d1 tests. D3d9 in particular is weird because it has the device/visual split for d3d9, but a single file for d3d9ex.
Perhaps some of the mode setting tests can be merged together, although obviously at the cost of increased complexity, or perhaps we can e.g. introduce a WINETEST_ environment variable to avoid running them. I think improving the mode setting tests is a separate issue from merging device.c and visual.c though.
As an aside, many of the Present() calls in visual.c are really only useful when debugging, and just removing them may speed things up as well, although I haven't verified that.
(Yeah, I can comment out unused tests while working on a new one, but that's awkward too.)
I pretty much already always do that. In part because it helps to avoid depending on side effects of previous tests, and in part because it's just so much faster, especially on the testbot.