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.

177 lines
5.1KB

  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. @item HWACCEL
  74. Specify which hardware acceleration to use while running regression tests,
  75. by default none is used.
  76. @end table
  77. @example
  78. make V=1 SAMPLES=/var/fate/samples THREADS=2 CPUFLAGS=mmx fate
  79. @end example
  80. @chapter Automated Tests
  81. In order to automatically testing specific configurations, e.g. multiple
  82. compilers, @command{tests/fate.sh} is provided.
  83. This shell script builds Libav, runs the regression tests and prepares
  84. a report that can be sent to @url{http://fate.libav.org/} or directly
  85. examined locally.
  86. @section Testing Profiles
  87. The configuration file passed to @command{fate.sh} is shell scripts as well.
  88. It must provide at least a @var{slot} identifier, the @var{repo} from
  89. which fetch the sources, the @var{samples} directory, a @var{workdir} with
  90. enough space to build and run all the tests.
  91. Optional submit command @var{fate_recv} and a @var{comment} to describe
  92. the testing profile are available.
  93. Additional optional parameter to tune the Libav building and reporting process
  94. can be passed.
  95. @example
  96. slot= # some unique identifier
  97. repo=git://git.libav.org/libav.git # the source repository
  98. #branch=release/10 # the branch to test
  99. samples=/path/to/fate/samples
  100. workdir= # directory in which to do all the work
  101. fate_recv="ssh -T fate@@fate.libav.org" # command to submit report
  102. comment= # optional description
  103. build_only= # set to "yes" for a compile-only instance that skips tests
  104. ignore_tests=
  105. # the following are optional and map to configure options
  106. arch=
  107. cpu=
  108. cross_prefix=
  109. as=
  110. cc=
  111. ld=
  112. target_os=
  113. sysroot=
  114. target_exec=
  115. target_path=
  116. target_samples=
  117. extra_cflags=
  118. extra_ldflags=
  119. extra_libs=
  120. extra_conf= # extra configure options not covered above
  121. #make= # name of GNU make if not 'make'
  122. makeopts= # extra options passed to 'make'
  123. #makeopts_fate= # extra options passed to 'make' when running tests,
  124. # defaulting to makeopts above if this is not set
  125. #tar= # command to create a tar archive from its arguments on
  126. # stdout, defaults to 'tar c'
  127. @end example
  128. @section Special Instances
  129. The @var{TARGET_EXEC} option provides a way to run FATE wrapped in
  130. @command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets
  131. through @command{ssh}.
  132. @section Submitting Reports
  133. In order to send reports you need to create an @command{ssh} key and send it
  134. to @email{root@@libav.org}.