mpv/player
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
..
javascript js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
lua stats, demux: log byte level stream seeks 2019-11-07 22:53:13 +01:00
audio.c player: partially rework --cache-pause 2019-10-11 20:01:51 +02:00
client.c client API: reduce log level of client exiting 2019-11-01 01:54:39 +01:00
client.h client API: remove unused global event mask 2019-10-24 16:27:24 +02:00
command.c stats, demux: log byte level stream seeks 2019-11-07 22:53:13 +01:00
command.h demux, command: add a third stream recording mechanism 2019-09-19 20:37:05 +02:00
configfiles.c player: update for --video-aspect deprecation 2019-10-04 22:41:31 +02:00
core.h video: do not disable display-sync on A/V desync 2019-10-17 19:23:35 +02:00
external_files.c external_files: add .lrc subtitle extension 2019-09-02 01:25:43 +03:00
external_files.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
javascript.c js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
loadfile.c player: avoid duplicate track auto selection 2019-10-18 12:11:11 +02:00
lua.c lua: expose mpv_abort_async_command() 2018-05-24 19:56:34 +02:00
main.c test: make tests part of the mpv binary 2019-11-08 00:26:37 +01:00
misc.c player: simplify --stream-dump code 2019-10-31 11:05:55 +01:00
osd.c player: format low cache duration with more decimals 2019-10-11 19:18:43 +02:00
playloop.c player: partially rework --cache-pause 2019-10-11 20:01:51 +02:00
screenshot.c screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
screenshot.h screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
scripting.c scripting: change when/how player waits for scripts being loaded 2018-04-18 01:17:41 +03:00
sub.c player: ensure backward playback state is propagated on track switching 2019-09-19 20:37:05 +02:00
video.c video: do not disable display-sync on A/V desync 2019-10-17 19:23:35 +02:00