星火直播PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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