yading@10
|
1 FFmpeg Automated Testing Environment
|
yading@10
|
2 ************************************
|
yading@10
|
3
|
yading@10
|
4 Table of Contents
|
yading@10
|
5 *****************
|
yading@10
|
6
|
yading@10
|
7 FFmpeg Automated Testing Environment
|
yading@10
|
8 1 Introduction
|
yading@10
|
9 2 Using FATE from your FFmpeg source directory
|
yading@10
|
10 3 Submitting the results to the FFmpeg result aggregation server
|
yading@10
|
11 4 FATE makefile targets and variables
|
yading@10
|
12 4.1 Makefile targets
|
yading@10
|
13 4.2 Makefile variables
|
yading@10
|
14 4.3 Examples
|
yading@10
|
15
|
yading@10
|
16
|
yading@10
|
17 1 Introduction
|
yading@10
|
18 **************
|
yading@10
|
19
|
yading@10
|
20 FATE is an extended regression suite on the client-side and a means for
|
yading@10
|
21 results aggregation and presentation on the server-side.
|
yading@10
|
22
|
yading@10
|
23 The first part of this document explains how you can use FATE from
|
yading@10
|
24 your FFmpeg source directory to test your ffmpeg binary. The second
|
yading@10
|
25 part describes how you can run FATE to submit the results to FFmpeg's
|
yading@10
|
26 FATE server.
|
yading@10
|
27
|
yading@10
|
28 In any way you can have a look at the publicly viewable FATE results
|
yading@10
|
29 by visiting this website:
|
yading@10
|
30
|
yading@10
|
31 `http://fate.ffmpeg.org/'
|
yading@10
|
32
|
yading@10
|
33 This is especially recommended for all people contributing source
|
yading@10
|
34 code to FFmpeg, as it can be seen if some test on some platform broke
|
yading@10
|
35 with their recent contribution. This usually happens on the platforms
|
yading@10
|
36 the developers could not test on.
|
yading@10
|
37
|
yading@10
|
38 The second part of this document describes how you can run FATE to
|
yading@10
|
39 submit your results to FFmpeg's FATE server. If you want to submit your
|
yading@10
|
40 results be sure to check that your combination of CPU, OS and compiler
|
yading@10
|
41 is not already listed on the above mentioned website.
|
yading@10
|
42
|
yading@10
|
43 In the third part you can find a comprehensive listing of FATE
|
yading@10
|
44 makefile targets and variables.
|
yading@10
|
45
|
yading@10
|
46 2 Using FATE from your FFmpeg source directory
|
yading@10
|
47 **********************************************
|
yading@10
|
48
|
yading@10
|
49 If you want to run FATE on your machine you need to have the samples in
|
yading@10
|
50 place. You can get the samples via the build target fate-rsync. Use
|
yading@10
|
51 this command from the top-level source directory:
|
yading@10
|
52
|
yading@10
|
53 make fate-rsync SAMPLES=fate-suite/
|
yading@10
|
54 make fate SAMPLES=fate-suite/
|
yading@10
|
55
|
yading@10
|
56 The above commands set the samples location by passing a makefile
|
yading@10
|
57 variable via command line. It is also possible to set the samples
|
yading@10
|
58 location at source configuration time by invoking configure with
|
yading@10
|
59 `-samples=<path to the samples directory>'. Afterwards you can invoke
|
yading@10
|
60 the makefile targets without setting the SAMPLES makefile variable.
|
yading@10
|
61 This is illustrated by the following commands:
|
yading@10
|
62
|
yading@10
|
63 ./configure --samples=fate-suite/
|
yading@10
|
64 make fate-rsync
|
yading@10
|
65 make fate
|
yading@10
|
66
|
yading@10
|
67 Yet another way to tell FATE about the location of the sample
|
yading@10
|
68 directory is by making sure the environment variable FATE_SAMPLES
|
yading@10
|
69 contains the path to your samples directory. This can be achieved by
|
yading@10
|
70 e.g. putting that variable in your shell profile or by setting it in
|
yading@10
|
71 your interactive session.
|
yading@10
|
72
|
yading@10
|
73 FATE_SAMPLES=fate-suite/ make fate
|
yading@10
|
74
|
yading@10
|
75 Do not put a '~' character in the samples path to indicate a home
|
yading@10
|
76 directory. Because of shell nuances, this will cause FATE to fail.
|
yading@10
|
77
|
yading@10
|
78 NOTE
|
yading@10
|
79
|
yading@10
|
80 To use a custom wrapper to run the test, pass `--target-exec' to
|
yading@10
|
81 `configure' or set the TARGET_EXEC Make variable.
|
yading@10
|
82
|
yading@10
|
83 3 Submitting the results to the FFmpeg result aggregation server
|
yading@10
|
84 ****************************************************************
|
yading@10
|
85
|
yading@10
|
86 To submit your results to the server you should run fate through the
|
yading@10
|
87 shell script `tests/fate.sh' from the FFmpeg sources. This script needs
|
yading@10
|
88 to be invoked with a configuration file as its first argument.
|
yading@10
|
89
|
yading@10
|
90 tests/fate.sh /path/to/fate_config
|
yading@10
|
91
|
yading@10
|
92 A configuration file template with comments describing the individual
|
yading@10
|
93 configuration variables can be found at `doc/fate_config.sh.template'.
|
yading@10
|
94
|
yading@10
|
95 Create a configuration that suits your needs, based on the
|
yading@10
|
96 configuration template. The `slot' configuration variable can be any
|
yading@10
|
97 string that is not yet used, but it is suggested that you name it
|
yading@10
|
98 adhering to the following pattern <arch>-<os>-<compiler>-<compiler
|
yading@10
|
99 version>. The configuration file itself will be sourced in a shell
|
yading@10
|
100 script, therefore all shell features may be used. This enables you to
|
yading@10
|
101 setup the environment as you need it for your build.
|
yading@10
|
102
|
yading@10
|
103 For your first test runs the `fate_recv' variable should be empty or
|
yading@10
|
104 commented out. This will run everything as normal except that it will
|
yading@10
|
105 omit the submission of the results to the server. The following files
|
yading@10
|
106 should be present in $workdir as specified in the configuration file:
|
yading@10
|
107
|
yading@10
|
108 * configure.log
|
yading@10
|
109
|
yading@10
|
110 * compile.log
|
yading@10
|
111
|
yading@10
|
112 * test.log
|
yading@10
|
113
|
yading@10
|
114 * report
|
yading@10
|
115
|
yading@10
|
116 * version
|
yading@10
|
117
|
yading@10
|
118 When you have everything working properly you can create an SSH key
|
yading@10
|
119 pair and send the public key to the FATE server administrator who can
|
yading@10
|
120 be contacted at the email address <fate-admin@ffmpeg.org>.
|
yading@10
|
121
|
yading@10
|
122 Configure your SSH client to use public key authentication with that
|
yading@10
|
123 key when connecting to the FATE server. Also do not forget to check the
|
yading@10
|
124 identity of the server and to accept its host key. This can usually be
|
yading@10
|
125 achieved by running your SSH client manually and killing it after you
|
yading@10
|
126 accepted the key. The FATE server's fingerprint is:
|
yading@10
|
127
|
yading@10
|
128 b1:31:c8:79:3f:04:1d:f8:f2:23:26:5a:fd:55:fa:92
|
yading@10
|
129
|
yading@10
|
130 If you have problems connecting to the FATE server, it may help to
|
yading@10
|
131 try out the `ssh' command with one or more `-v' options. You should get
|
yading@10
|
132 detailed output concerning your SSH configuration and the authentication
|
yading@10
|
133 process.
|
yading@10
|
134
|
yading@10
|
135 The only thing left is to automate the execution of the fate.sh
|
yading@10
|
136 script and the synchronisation of the samples directory.
|
yading@10
|
137
|
yading@10
|
138 4 FATE makefile targets and variables
|
yading@10
|
139 *************************************
|
yading@10
|
140
|
yading@10
|
141 4.1 Makefile targets
|
yading@10
|
142 ====================
|
yading@10
|
143
|
yading@10
|
144 `fate-rsync'
|
yading@10
|
145 Download/synchronize sample files to the configured samples
|
yading@10
|
146 directory.
|
yading@10
|
147
|
yading@10
|
148 `fate-list'
|
yading@10
|
149 Will list all fate/regression test targets.
|
yading@10
|
150
|
yading@10
|
151 `fate'
|
yading@10
|
152 Run the FATE test suite (requires the fate-suite dataset).
|
yading@10
|
153
|
yading@10
|
154 4.2 Makefile variables
|
yading@10
|
155 ======================
|
yading@10
|
156
|
yading@10
|
157 `V'
|
yading@10
|
158 Verbosity level, can be set to 0, 1 or 2.
|
yading@10
|
159 * 0: show just the test arguments
|
yading@10
|
160
|
yading@10
|
161 * 1: show just the command used in the test
|
yading@10
|
162
|
yading@10
|
163 * 2: show everything
|
yading@10
|
164
|
yading@10
|
165 `SAMPLES'
|
yading@10
|
166 Specify or override the path to the FATE samples at make time, it
|
yading@10
|
167 has a meaning only while running the regression tests.
|
yading@10
|
168
|
yading@10
|
169 `THREADS'
|
yading@10
|
170 Specify how many threads to use while running regression tests, it
|
yading@10
|
171 is quite useful to detect thread-related regressions.
|
yading@10
|
172
|
yading@10
|
173 `THREAD_TYPE'
|
yading@10
|
174 Specify which threading strategy test, either SLICE or FRAME,
|
yading@10
|
175 by default SLICE+FRAME
|
yading@10
|
176
|
yading@10
|
177 `CPUFLAGS'
|
yading@10
|
178 Specify CPU flags.
|
yading@10
|
179
|
yading@10
|
180 `TARGET_EXEC'
|
yading@10
|
181 Specify or override the wrapper used to run the tests. The
|
yading@10
|
182 TARGET_EXEC option provides a way to run FATE wrapped in
|
yading@10
|
183 `valgrind', `qemu-user' or `wine' or on remote targets through
|
yading@10
|
184 `ssh'.
|
yading@10
|
185
|
yading@10
|
186 `GEN'
|
yading@10
|
187 Set to 1 to generate the missing or mismatched references.
|
yading@10
|
188
|
yading@10
|
189 4.3 Examples
|
yading@10
|
190 ============
|
yading@10
|
191
|
yading@10
|
192 make V=1 SAMPLES=/var/fate/samples THREADS=2 CPUFLAGS=mmx fate
|
yading@10
|
193
|