fate.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. FFmpeg Automated Testing Environment
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. FFmpeg Automated Testing Environment
  17. </h1>
  18. <div align="center">
  19. </div>
  20. <a name="Top"></a>
  21. <a name="SEC_Top"></a>
  22. <span id="SEC_Contents"></span>
  23. <h2 class="contents-heading">Table of Contents</h2>
  24. <div class="contents">
  25. <ul class="no-bullet">
  26. <li><a id="toc-Introduction" href="#Introduction">1 Introduction</a></li>
  27. <li><a id="toc-Using-FATE-from-your-FFmpeg-source-directory" href="#Using-FATE-from-your-FFmpeg-source-directory">2 Using FATE from your FFmpeg source directory</a></li>
  28. <li><a id="toc-Submitting-the-results-to-the-FFmpeg-result-aggregation-server" href="#Submitting-the-results-to-the-FFmpeg-result-aggregation-server">3 Submitting the results to the FFmpeg result aggregation server</a></li>
  29. <li><a id="toc-Uploading-new-samples-to-the-fate-suite" href="#Uploading-new-samples-to-the-fate-suite">4 Uploading new samples to the fate suite</a></li>
  30. <li><a id="toc-FATE-makefile-targets-and-variables" href="#FATE-makefile-targets-and-variables">5 FATE makefile targets and variables</a>
  31. <ul class="no-bullet">
  32. <li><a id="toc-Makefile-targets" href="#Makefile-targets">5.1 Makefile targets</a></li>
  33. <li><a id="toc-Makefile-variables" href="#Makefile-variables">5.2 Makefile variables</a></li>
  34. <li><a id="toc-Examples" href="#Examples">5.3 Examples</a></li>
  35. </ul></li>
  36. </ul>
  37. </div>
  38. <a name="Introduction"></a>
  39. <h2 class="chapter">1 Introduction<span class="pull-right"><a class="anchor hidden-xs" href="#Introduction" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Introduction" aria-hidden="true">TOC</a></span></h2>
  40. <p>FATE is an extended regression suite on the client-side and a means
  41. for results aggregation and presentation on the server-side.
  42. </p>
  43. <p>The first part of this document explains how you can use FATE from
  44. your FFmpeg source directory to test your ffmpeg binary. The second
  45. part describes how you can run FATE to submit the results to FFmpeg&rsquo;s
  46. FATE server.
  47. </p>
  48. <p>In any way you can have a look at the publicly viewable FATE results
  49. by visiting this website:
  50. </p>
  51. <p><a href="http://fate.ffmpeg.org/">http://fate.ffmpeg.org/</a>
  52. </p>
  53. <p>This is especially recommended for all people contributing source
  54. code to FFmpeg, as it can be seen if some test on some platform broke
  55. with their recent contribution. This usually happens on the platforms
  56. the developers could not test on.
  57. </p>
  58. <p>The second part of this document describes how you can run FATE to
  59. submit your results to FFmpeg&rsquo;s FATE server. If you want to submit your
  60. results be sure to check that your combination of CPU, OS and compiler
  61. is not already listed on the above mentioned website.
  62. </p>
  63. <p>In the third part you can find a comprehensive listing of FATE makefile
  64. targets and variables.
  65. </p>
  66. <a name="Using-FATE-from-your-FFmpeg-source-directory"></a>
  67. <h2 class="chapter">2 Using FATE from your FFmpeg source directory<span class="pull-right"><a class="anchor hidden-xs" href="#Using-FATE-from-your-FFmpeg-source-directory" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Using-FATE-from-your-FFmpeg-source-directory" aria-hidden="true">TOC</a></span></h2>
  68. <p>If you want to run FATE on your machine you need to have the samples
  69. in place. You can get the samples via the build target fate-rsync.
  70. Use this command from the top-level source directory:
  71. </p>
  72. <div class="example">
  73. <pre class="example">make fate-rsync SAMPLES=fate-suite/
  74. make fate SAMPLES=fate-suite/
  75. </pre></div>
  76. <p>The above commands set the samples location by passing a makefile
  77. variable via command line. It is also possible to set the samples
  78. location at source configuration time by invoking configure with
  79. <samp>--samples=&lt;path to the samples directory&gt;</samp>. Afterwards you can
  80. invoke the makefile targets without setting the <var>SAMPLES</var> makefile
  81. variable. This is illustrated by the following commands:
  82. </p>
  83. <div class="example">
  84. <pre class="example">./configure --samples=fate-suite/
  85. make fate-rsync
  86. make fate
  87. </pre></div>
  88. <p>Yet another way to tell FATE about the location of the sample
  89. directory is by making sure the environment variable FATE_SAMPLES
  90. contains the path to your samples directory. This can be achieved
  91. by e.g. putting that variable in your shell profile or by setting
  92. it in your interactive session.
  93. </p>
  94. <div class="example">
  95. <pre class="example">FATE_SAMPLES=fate-suite/ make fate
  96. </pre></div>
  97. <div class="info">
  98. <p>Do not put a &rsquo;~&rsquo; character in the samples path to indicate a home
  99. directory. Because of shell nuances, this will cause FATE to fail.
  100. </p></div>
  101. <p>To use a custom wrapper to run the test, pass <samp>--target-exec</samp> to
  102. <code>configure</code> or set the <var>TARGET_EXEC</var> Make variable.
  103. </p>
  104. <a name="Submitting-the-results-to-the-FFmpeg-result-aggregation-server"></a>
  105. <h2 class="chapter">3 Submitting the results to the FFmpeg result aggregation server<span class="pull-right"><a class="anchor hidden-xs" href="#Submitting-the-results-to-the-FFmpeg-result-aggregation-server" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Submitting-the-results-to-the-FFmpeg-result-aggregation-server" aria-hidden="true">TOC</a></span></h2>
  106. <p>To submit your results to the server you should run fate through the
  107. shell script <samp>tests/fate.sh</samp> from the FFmpeg sources. This script needs
  108. to be invoked with a configuration file as its first argument.
  109. </p>
  110. <div class="example">
  111. <pre class="example">tests/fate.sh /path/to/fate_config
  112. </pre></div>
  113. <p>A configuration file template with comments describing the individual
  114. configuration variables can be found at <samp>doc/fate_config.sh.template</samp>.
  115. </p>
  116. <p>The mentioned configuration template is also available here:
  117. </p><pre class="verbatim">slot= # some unique identifier
  118. repo=git://source.ffmpeg.org/ffmpeg.git # the source repository
  119. #branch=release/2.6 # the branch to test
  120. samples= # path to samples directory
  121. workdir= # directory in which to do all the work
  122. #fate_recv=&quot;ssh -T fate@fate.ffmpeg.org&quot; # command to submit report
  123. comment= # optional description
  124. build_only= # set to &quot;yes&quot; for a compile-only instance that skips tests
  125. ignore_tests=
  126. # the following are optional and map to configure options
  127. arch=
  128. cpu=
  129. cross_prefix=
  130. as=
  131. cc=
  132. ld=
  133. target_os=
  134. sysroot=
  135. target_exec=
  136. target_path=
  137. target_samples=
  138. extra_cflags=
  139. extra_ldflags=
  140. extra_libs=
  141. extra_conf= # extra configure options not covered above
  142. #make= # name of GNU make if not 'make'
  143. makeopts= # extra options passed to 'make'
  144. #makeopts_fate= # extra options passed to 'make' when running tests,
  145. # defaulting to makeopts above if this is not set
  146. #tar= # command to create a tar archive from its arguments on stdout,
  147. # defaults to 'tar c'
  148. </pre>
  149. <p>Create a configuration that suits your needs, based on the configuration
  150. template. The <code>slot</code> configuration variable can be any string that is not
  151. yet used, but it is suggested that you name it adhering to the following
  152. pattern &lsquo;<samp><var>arch</var>-<var>os</var>-<var>compiler</var>-<var>compiler version</var></samp>&rsquo;. The
  153. configuration file itself will be sourced in a shell script, therefore all
  154. shell features may be used. This enables you to setup the environment as you
  155. need it for your build.
  156. </p>
  157. <p>For your first test runs the <code>fate_recv</code> variable should be empty or
  158. commented out. This will run everything as normal except that it will omit
  159. the submission of the results to the server. The following files should be
  160. present in $workdir as specified in the configuration file:
  161. </p>
  162. <ul>
  163. <li> configure.log
  164. </li><li> compile.log
  165. </li><li> test.log
  166. </li><li> report
  167. </li><li> version
  168. </li></ul>
  169. <p>When you have everything working properly you can create an SSH key pair
  170. and send the public key to the FATE server administrator who can be contacted
  171. at the email address <a href="mailto:fate-admin@ffmpeg.org">fate-admin@ffmpeg.org</a>.
  172. </p>
  173. <p>Configure your SSH client to use public key authentication with that key
  174. when connecting to the FATE server. Also do not forget to check the identity
  175. of the server and to accept its host key. This can usually be achieved by
  176. running your SSH client manually and killing it after you accepted the key.
  177. The FATE server&rsquo;s fingerprint is:
  178. </p>
  179. <dl compact="compact">
  180. <dt>&lsquo;<samp>RSA</samp>&rsquo;</dt>
  181. <dd><p>d3:f1:83:97:a4:75:2b:a6:fb:d6:e8:aa:81:93:97:51
  182. </p></dd>
  183. <dt>&lsquo;<samp>ECDSA</samp>&rsquo;</dt>
  184. <dd><p>76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86
  185. </p></dd>
  186. </dl>
  187. <p>If you have problems connecting to the FATE server, it may help to try out
  188. the <code>ssh</code> command with one or more <samp>-v</samp> options. You should
  189. get detailed output concerning your SSH configuration and the authentication
  190. process.
  191. </p>
  192. <p>The only thing left is to automate the execution of the fate.sh script and
  193. the synchronisation of the samples directory.
  194. </p>
  195. <a name="Uploading-new-samples-to-the-fate-suite"></a>
  196. <h2 class="chapter">4 Uploading new samples to the fate suite<span class="pull-right"><a class="anchor hidden-xs" href="#Uploading-new-samples-to-the-fate-suite" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Uploading-new-samples-to-the-fate-suite" aria-hidden="true">TOC</a></span></h2>
  197. <p>If you need a sample uploaded send a mail to samples-request.
  198. </p>
  199. <p>This is for developers who have an account on the fate suite server.
  200. If you upload new samples, please make sure they are as small as possible,
  201. space on each client, network bandwidth and so on benefit from smaller test cases.
  202. Also keep in mind older checkouts use existing sample files, that means in
  203. practice generally do not replace, remove or overwrite files as it likely would
  204. break older checkouts or releases.
  205. Also all needed samples for a commit should be uploaded, ideally 24
  206. hours, before the push.
  207. If you need an account for frequently uploading samples or you wish to help
  208. others by doing that send a mail to ffmpeg-devel.
  209. </p>
  210. <div class="example">
  211. <pre class="example">#First update your local samples copy:
  212. rsync -vauL --chmod=Dg+s,Duo+x,ug+rw,o+r,o-w,+X fate-suite.ffmpeg.org:/home/samples/fate-suite/ ~/fate-suite
  213. #Then do a dry run checking what would be uploaded:
  214. rsync -vanL --no-g --chmod=Dg+s,Duo+x,ug+rw,o+r,o-w,+X ~/fate-suite/ fate-suite.ffmpeg.org:/home/samples/fate-suite
  215. #Upload the files:
  216. rsync -vaL --no-g --chmod=Dg+s,Duo+x,ug+rw,o+r,o-w,+X ~/fate-suite/ fate-suite.ffmpeg.org:/home/samples/fate-suite
  217. </pre></div>
  218. <a name="FATE-makefile-targets-and-variables"></a>
  219. <h2 class="chapter">5 FATE makefile targets and variables<span class="pull-right"><a class="anchor hidden-xs" href="#FATE-makefile-targets-and-variables" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-FATE-makefile-targets-and-variables" aria-hidden="true">TOC</a></span></h2>
  220. <a name="Makefile-targets"></a>
  221. <h3 class="section">5.1 Makefile targets<span class="pull-right"><a class="anchor hidden-xs" href="#Makefile-targets" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Makefile-targets" aria-hidden="true">TOC</a></span></h3>
  222. <dl compact="compact">
  223. <dt><samp>fate-rsync</samp></dt>
  224. <dd><p>Download/synchronize sample files to the configured samples directory.
  225. </p>
  226. </dd>
  227. <dt><samp>fate-list</samp></dt>
  228. <dd><p>Will list all fate/regression test targets.
  229. </p>
  230. </dd>
  231. <dt><samp>fate</samp></dt>
  232. <dd><p>Run the FATE test suite (requires the fate-suite dataset).
  233. </p></dd>
  234. </dl>
  235. <a name="Makefile-variables"></a>
  236. <h3 class="section">5.2 Makefile variables<span class="pull-right"><a class="anchor hidden-xs" href="#Makefile-variables" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Makefile-variables" aria-hidden="true">TOC</a></span></h3>
  237. <dl compact="compact">
  238. <dt><code>V</code></dt>
  239. <dd><p>Verbosity level, can be set to 0, 1 or 2.
  240. </p><ul>
  241. <li> 0: show just the test arguments
  242. </li><li> 1: show just the command used in the test
  243. </li><li> 2: show everything
  244. </li></ul>
  245. </dd>
  246. <dt><code>SAMPLES</code></dt>
  247. <dd><p>Specify or override the path to the FATE samples at make time, it has a
  248. meaning only while running the regression tests.
  249. </p>
  250. </dd>
  251. <dt><code>THREADS</code></dt>
  252. <dd><p>Specify how many threads to use while running regression tests, it is
  253. quite useful to detect thread-related regressions.
  254. </p>
  255. </dd>
  256. <dt><code>THREAD_TYPE</code></dt>
  257. <dd><p>Specify which threading strategy test, either &lsquo;<samp>slice</samp>&rsquo; or &lsquo;<samp>frame</samp>&rsquo;,
  258. by default &lsquo;<samp>slice+frame</samp>&rsquo;
  259. </p>
  260. </dd>
  261. <dt><code>CPUFLAGS</code></dt>
  262. <dd><p>Specify CPU flags.
  263. </p>
  264. </dd>
  265. <dt><code>TARGET_EXEC</code></dt>
  266. <dd><p>Specify or override the wrapper used to run the tests.
  267. The <code>TARGET_EXEC</code> option provides a way to run FATE wrapped in
  268. <code>valgrind</code>, <code>qemu-user</code> or <code>wine</code> or on remote targets
  269. through <code>ssh</code>.
  270. </p>
  271. </dd>
  272. <dt><code>GEN</code></dt>
  273. <dd><p>Set to &lsquo;<samp>1</samp>&rsquo; to generate the missing or mismatched references.
  274. </p>
  275. </dd>
  276. <dt><code>HWACCEL</code></dt>
  277. <dd><p>Specify which hardware acceleration to use while running regression tests,
  278. by default &lsquo;<samp>none</samp>&rsquo; is used.
  279. </p>
  280. </dd>
  281. <dt><code>KEEP</code></dt>
  282. <dd><p>Set to &lsquo;<samp>1</samp>&rsquo; to keep temp files generated by fate test(s) when test is successful.
  283. Default is &lsquo;<samp>0</samp>&rsquo;, which removes these files. Files are always kept when a test
  284. fails.
  285. </p>
  286. </dd>
  287. </dl>
  288. <a name="Examples"></a>
  289. <h3 class="section">5.3 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples" aria-hidden="true">TOC</a></span></h3>
  290. <div class="example">
  291. <pre class="example">make V=1 SAMPLES=/var/fate/samples THREADS=2 CPUFLAGS=mmx fate
  292. </pre></div>
  293. <p style="font-size: small;">
  294. This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
  295. </p>
  296. </div>
  297. </body>
  298. </html>