Running FATE

From MultimediaWiki
Revision as of 03:14, 29 September 2010 by Mik (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Get The Samples

Sync the FATE samples:

 rsync -WaL rsync://rsync.mplayerhq.hu:/samples/fate-suite/ /path/to/fate/samples

Configuration

Create a configuration file setting the following variables:

slot=                                   # some unique identifier
repo=svn://svn.ffmpeg.org/ffmpeg/trunk         # the source repository
samples=/path/to/fate/samples
fate_recv="ssh fate@fate.ffmpeg.org"    # command to submit report

# the following are optional and map to configure options
arch=
cpu=
cross_prefix=
cc=
target_os=
sysroot=
target_exec=
target_path=
extra_cflags=
extra_ldflags=
extra_libs=
extra_conf=     # extra configure options not covered above

make=           # name of GNU make if not 'make'
workdir=        # directory in which to do all the work

This file is parsed by the shell, so any shell features may be used. Any site-specific settings can be made here as well, such as PATH to compilers etc. One such file is required per configuration to be tested.

The $slot value can be anything not already in use. I have chosen names of the form arch-os-compiler-version for mine, and I suggest others follow a similar scheme. Allowed characters are alphanumeric, underscore, period, and hyphen.

Get the Script

Fetch the file 'tests/fate.sh' from the ffmpeg repo. This script checks out the source, builds it, runs the tests, and submits the report to the server. I suggest you watch it for changes and update keep an up to date version, although I hope this file will be rather stable.

Test Run

Perform a test run by leaving $fate_recv unset in the configuration and issue the command "fate.sh /path/to/config/file". This should perform all the steps except the final report submission. In the end, $workdir should contain the following files:

  • configure.log
  • compile.log
  • test.log
  • report
  • version

After a successful run, the 'report' file should contain one line for each test and a couple of header lines. Most of the content is base64-encoded, so it will look like gibberish.

If any of the files are missing, or if the report seems too sparse, check for errors that may have occurred.

Delete the version file to force a retest of the same revision.

Submitting Resuts

When everything is working properly, create and ssh key, send it to the FATE system adminstrator, and await confirmation. Make sure the ssh command used in the fate_recv setting uses this key for authentication. You will also need to accept the host key of the server. It's fingerprint is

 a4:99:d7:d3:1c:92:0d:56:d6:d5:61:be:01:ae:7d:e6

Accepting the host key is most easily done by running the ssh command directly from a shell once. When it connects, simply kill it. You will not get a shell prompt.

Regular Cycles

You are now ready to commence automated testing. Set up a cron job, shell script, or use whatever means you prefer to run the command from step 3 at regular intervals. If using multiple configurations, a simple shell wrapper iterating over them may be convenient.

The fate.sh script will refuse to run if the workdir is locked by the presence of a fate.lock file there. If something dies leaving this file behind, you must delete it manually.

Adjunct to running the FATE script from cron, it's also useful to rsync the FATE samples directory via cron. This doesn't need to be performed as frequently. Once per day is adequate.