| Version 2 (modified by , 12 years ago) ( diff ) |
|---|
Adding a FATE Test
There are two main kinds of FATE test: using existing samples (primarily useful with decoder testing), and using an artificially generated sample for testing.
The recipes for the tests written in GNU Make are located under tests/fate in the FFmpeg source. Because FFmpeg has a very complex codebase, differing code needs a wide variety of tests. Let us start with the common part of the tests.
Four Parts of a Test
A typical test usually consists of four parts:
- Registration: meaning that
make fateautomatically execute the test you want to add; - Dependencies: which are usually samples for a format, a generated sample, or a program specifically written to test this feature;
- Configuration: this part is the most important of all, because it controls how the test will be run.
Let us focus on the separate parts of a test.
Registration
One Test for one Feature
The most common case is that only one test is allocated for one feature (e.g. decoder, muxer, hashing algorithm, etc.). Let's open tests/fate/audio.mak, which is a file containing tests for audio codecs.


