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