summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-08 17:20:57 +0100
committerwm4 <wm4@nowhere>2019-11-08 21:22:49 +0100
commit1edb3d061bd88e86cba05e9383d6decb4a13950b (patch)
tree18b5438f040464f841c5e0b9ae0a877175759c75 /wscript_build.py
parenta6c8b4efa59628a755755c510aa9ee6db2728fb9 (diff)
downloadmpv-1edb3d061bd88e86cba05e9383d6decb4a13950b.tar.bz2
mpv-1edb3d061bd88e86cba05e9383d6decb4a13950b.tar.xz
test: add dumping of img_format metadata
This is fragile enough that it warrants getting "monitored". This takes the commented test program code from img_format.c, makes it output to a text file, and then compares it to a "ref" file stored in git. Originally, I wanted to do the comparison etc. in a shell or Python script. But why not do it in C. So mpv calls /usr/bin/diff as a sub-process now. This test will start producing different output if FFmpeg adds new pixel formats or pixel format flags, or if mpv adds new IMGFMT (either aliases to FFmpeg formats or own formats). That is unavoidable, and requires manual inspection of the results, and then updating the ref file. The changes in the non-test code are to guarantee that the format ID conversion functions only translate between valid IDs.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index ff0b0b746f..ffb7bebb9c 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -397,6 +397,7 @@ def build(ctx):
## Tests
( "test/chmap.c", "tests" ),
( "test/gl_video.c", "tests" ),
+ ( "test/img_format.c", "tests" ),
( "test/json.c", "tests" ),
( "test/linked_list.c", "tests" ),
( "test/tests.c", "tests" ),