Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

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