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.

169 lines
4.9KB

  1. \input texinfo @c -*- texinfo -*-
  2. @settitle FATE Automated Testing Environment
  3. @titlepage
  4. @center @titlefont{FATE Automated Testing Environment}
  5. @end titlepage
  6. @top
  7. @contents
  8. @chapter Introduction
  9. FATE provides a regression test suite embedded within the Libav build system.
  10. It can be run locally and optionally configured to send reports to a web
  11. aggregator and viewer @url{http://fate.libav.org}.
  12. It is advised to run FATE before submitting patches to the current codebase
  13. and provide new tests when submitting patches to add additional features.
  14. @chapter Running FATE
  15. @section Samples and References
  16. In order to run, FATE needs a large amount of data (samples and references)
  17. that is provided separately from the actual source distribution.
  18. To inform the build system about the test suite location, pass
  19. @option{--samples=<path to the samples>} to @command{configure} or set the
  20. @var{SAMPLES} Make variable or the @var{LIBAV_SAMPLES} environment variable
  21. to a suitable value.
  22. To use a custom wrapper to run the test, pass @option{--target-exec} to
  23. @command{configure} or set the @var{TARGET_EXEC} Make variable.
  24. The dataset is available through @command{rsync}, is possible to fetch
  25. the current sample using the straight rsync command or through a specific
  26. @ref{Makefile target}.
  27. @example
  28. # rsync -aL rsync://fate-suite.libav.org/fate-suite/ fate-suite
  29. @end example
  30. @example
  31. # make fate-rsync SAMPLES=fate-suite
  32. @end example
  33. @chapter Manual Run
  34. FATE regression test can be run through @command{make}.
  35. Specific Makefile targets and Makefile variables are available:
  36. @anchor{Makefile target}
  37. @section FATE Makefile targets
  38. @table @option
  39. @item fate-list
  40. List all fate/regression test targets.
  41. @item fate-rsync
  42. Shortcut to download the fate test samples to the specified test suite location.
  43. @item fate
  44. Run the FATE test suite (requires the fate-suite dataset).
  45. @end table
  46. @section FATE Makefile variables
  47. @table @option
  48. @item V
  49. Verbosity level, can be set to 0, 1 or 2.
  50. @table @option
  51. @item 0
  52. show just the test arguments
  53. @item 1
  54. show just the command used in the test
  55. @item 2
  56. show everything
  57. @end table
  58. @item SAMPLES
  59. Specify or override the path to the FATE samples at make time, it has a
  60. meaning only while running the regression tests.
  61. @item THREADS
  62. Specify how many threads to use while running regression tests, it is
  63. quite useful to detect thread-related regressions.
  64. @item THREAD_TYPE
  65. Specify which threading strategy test, either @var{slice} or @var{frame},
  66. by default @var{slice+frame}
  67. @item CPUFLAGS
  68. Specify a mask to be applied to autodetected CPU flags.
  69. @item TARGET_EXEC
  70. Specify or override the wrapper used to run the tests.
  71. @item GEN
  72. Set to @var{1} to generate the missing or mismatched references.
  73. @end table
  74. @example
  75. make V=1 SAMPLES=/var/fate/samples THREADS=2 CPUFLAGS=mmx fate
  76. @end example
  77. @chapter Automated Tests
  78. In order to automatically testing specific configurations, e.g. multiple
  79. compilers, @command{tests/fate.sh} is provided.
  80. This shell script builds Libav, runs the regression tests and prepares
  81. a report that can be sent to @url{http://fate.libav.org/} or directly
  82. examined locally.
  83. @section Testing Profiles
  84. The configuration file passed to @command{fate.sh} is shell scripts as well.
  85. It must provide at least a @var{slot} identifier, the @var{repo} from
  86. which fetch the sources, the @var{samples} directory, a @var{workdir} with
  87. enough space to build and run all the tests.
  88. Optional submit command @var{fate_recv} and a @var{comment} to describe
  89. the testing profile are available.
  90. Additional optional parameter to tune the Libav building and reporting process
  91. can be passed.
  92. @example
  93. slot= # some unique identifier
  94. repo=git://git.libav.org/libav.git # the source repository
  95. #branch=release/10 # the branch to test
  96. samples=/path/to/fate/samples
  97. workdir= # directory in which to do all the work
  98. fate_recv="ssh -T fate@@fate.libav.org" # command to submit report
  99. comment= # optional description
  100. build_only= # set to "yes" for a compile-only instance that skips tests
  101. # the following are optional and map to configure options
  102. arch=
  103. cpu=
  104. cross_prefix=
  105. as=
  106. cc=
  107. ld=
  108. target_os=
  109. sysroot=
  110. target_exec=
  111. target_path=
  112. target_samples=
  113. extra_cflags=
  114. extra_ldflags=
  115. extra_libs=
  116. extra_conf= # extra configure options not covered above
  117. #make= # name of GNU make if not 'make'
  118. makeopts= # extra options passed to 'make'
  119. #tar= # command to create a tar archive from its arguments on
  120. # stdout, defaults to 'tar c'
  121. @end example
  122. @section Special Instances
  123. The @var{TARGET_EXEC} option provides a way to run FATE wrapped in
  124. @command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets
  125. through @command{ssh}.
  126. @section Submitting Reports
  127. In order to send reports you need to create an @command{ssh} key and send it
  128. to @email{root@@libav.org}.