[RFC] Using strmbase in tests

Zebediah Figura z.figura12 at gmail.com
Sat May 5 14:47:59 CDT 2018


Hello all,

It would be really nice to be able to link to Wine's strmbase in tests.
There is already one test that implements large parts of the filter and
pin functionality that is used there, and it seems to me that it would
be in our interest to be able to add more tests that would involve
putting our own filters in graphs, e.g. to be able to test filter and
pin methods directly, or to stream large amounts of data without having
to put it in resource files.

This almost "just works". The only thing preventing simply adding
"#include <wine/strmbase.h>" and linking to strmbase is that the latter
uses debug functions which live in libwine, and so cross-compiling
results in undefined references to wine_dbg_log() and wine_dbg_sprintf().

I've attached a patch as a proof-of-concept, which provides stubs for
these functions (actually they are semi-stubs, as they proved useful
when debugging the patch itself). As can be seen, it reduces the code
necessary to set up test_render_filter_priority() to 1/3 of its original
length (and it might be possible to reduce it further by using
BaseRenderer and TransformFilter).

Is this something that would be workable?

ἔρρωσθε,
Zeb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-quartz-tests-Reimplement-the-priority-test-filte.patch
Type: text/x-patch
Size: 51568 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180505/6ef9b59f/attachment-0001.bin>


More information about the wine-devel mailing list