1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00
mpv/DOCS/man
wm4 fb56896319 test: make tests part of the mpv binary
Until now, each .c file in test/ was built as separate, self-contained
binary. Each binary could be run to execute the tests it contained.

Change this and make them part of the normal mpv binary. Now the tests
have to be invoked via the --unittest option. Do this for two reasons:

- Tests now run within a "properly" initialized mpv instance, so all
  services are available.
- Possibly simplifying the situation for future build systems.

The first point is the main motivation. The mpv code is entangled with
mp_log and the option system. It feels like a bad idea to duplicate some
of the initialization of this just so you can call code using them.

I'm also getting rid of cmocka. There wouldn't be any problem to keep it
(it's a perfectly sane set of helpers), but NIH calls. I would have had
to aggregate all tests into a CMUnitTest list, and I don't see how I'd
get different types of entry points easily. Probably easily solvable,
but since we made only pretty basic use of this library, NIH-ing this is
actually easier (I needed a list of tests with custom metadata anyway,
so all what was left was reimplement the assert_* helpers).

Unit tests now don't output anything, and if they fail, they'll simply
crash and leave a message that typically requires inspecting the test
code to figure out what went wrong (and probably editing the test code
to get more information). I even merged the various test functions into
single ones. Sucks, but here you go.

chmap_sel.c is merged into chmap.c, because I didn't see the point of
this being separate. json.c drops the print_message() to go along with
the new silent-by-default idea, also there's a memory leak fix unrelated
to the rest of this commit.

The new code is enabled with --enable-tests (--enable-test goes away).
Due to waf's option parser, --enable-test still works, because it's a
unique prefix to --enable-tests.
2019-11-08 00:26:37 +01:00
..
af.rst audio: remove unreferenced af_lavrresample 2019-09-19 20:37:05 +02:00
ao.rst ao_pulse: add --pulse-allow-suspended 2019-09-21 12:54:36 +02:00
changes.rst
encode.rst encode: remove old timestamp handling 2018-05-03 01:08:44 +03:00
input.rst manpage: describe stride parameter in screenshot-raw command 2019-10-20 19:41:18 +02:00
ipc.rst ipc: alias set_property_string to set_property 2018-05-25 10:45:59 +02:00
javascript.rst js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
libmpv.rst
lua.rst DOCS: explicitly mention that property observing has an initial event 2019-10-08 21:11:55 +02:00
mpv.rst manpage: update input protocols 2019-11-04 16:24:57 +01:00
options.rst test: make tests part of the mpv binary 2019-11-08 00:26:37 +01:00
osc.rst osc: Unify bottom and topbar code 2019-10-28 17:16:02 +01:00
stats.rst manpage: document stats page 3 2019-10-31 11:06:22 +01:00
vf.rst manpage: fix RST formatting errorin vf_format description 2019-10-24 13:52:05 +02:00
vo.rst sws_utils, zimg: destroy vo_x11 and vo_drm performance 2019-10-31 16:51:12 +01:00