fate.html 16 KB

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