From MozillaWiki
Jump to: navigation, search

Although Sisyphus contains a number of different scripts, only and are intended to be used directly. Normally, and's complexity is hidden by a wrapper script such as the JavaScript Tests' which handles both creating builds and running tests. handles the task of cleaning, checking out and building the executable programs to be tested. Typically, the Sisyphus framework will call when it needs a build, however the script is useful in its own right when all you need to do is generate a set of builds.

usage: -p products -b branches -B buildcommands -T buildtypes [-e extra] [-d datafiles] [-v]

variable            description
===============     ===========================================================
-p products         required. one or more of js firefox thunderbird
-b branches         required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1
-B buildcommands    required. one or more of clean checkout build
-T buildtypes       required. one or more of opt debug
-e extra            optional. extra qualifier to pick build tree and mozconfig.
-d datafiles        optional. one or more filenames of files containing 
                    environment variable definitions to be included.
-v                  optional. verbose - copies log file output to stdout.

note that the environment variables should have the same names as in the 
"variable" column.

Using with command-line arguments

For example, to checkout and build opt and debug builds of Firefox for the 1.8.1 and 1.9.0 branches in your "test" trees, you could call as: -p "firefox" -b "1.8.1 1.9.0" -e test -T "opt debug" -B "checkout build" will checkout and build Firefox using the appropriate mozconfig files located in /work/mozilla/builds/1.8.1-test and /work/mozilla/builds/1.9.0-test as described in Create Build Directory for branches 1.8.1, 1.9.0 in the trees /work/mozilla/builds/1.8.1-test/mozilla and /work/mozilla/builds/1.9.0-test/mozilla while writing the log file names to stdout.

log: /work/mozilla/,firefox,1.8.1-test,,linux,,checkout.log
log: /work/mozilla/,firefox,1.9.0-test,,linux,,checkout.log
log: /work/mozilla/,firefox,1.8.1-test,opt,linux,,build.log
log: /work/mozilla/,firefox,1.8.1-test,debug,linux,,build.log
log: /work/mozilla/,firefox,1.9.0-test,opt,linux,,build.log
log: /work/mozilla/,firefox,1.9.0-test,debug,linux,,build.log

The log file names follow a definite template:

---- -- -- -- -- ------- ------- ----- ---- ----- ----- ----------------- -----
U Y  M  D  H  M  S T O      P      B     E   B T   O S     M N              C
T e  o  a  o  i  e i f      r      r     x   u y   p y     a a              o
C a  n  y  u  n  c m f      o      a     t   i p   e s     c m              m
  r  t     r  u  o e s      d      n     r   l e   r t     h e              m
     h        t  n z e      u      c     a   d     a e     i                a
              e  d o t      c      h               t m     n                n
              s  s n        t                      i       e                d
                   e                               n

If an error occurs during any step, the message FATAL ERROR is written to the log as well as stderr and processing will stop.

Using with "datafiles"

Sisyphus "datafiles" are essentially bash scripts located in $TEST_DIR/data which can be sourced into a running script to provide stored configurations of environment variables and command line arguments. This not only can help in simplifying passing arguments among sisyphus' many component scripts, it can also be used to provide arbitrary environment variable definitions such as TEST_MOZILLA_HG for default mercurial repositories.

For example, the following reproduces the checkout and build of opt and debug Firefox builds in the "test" trees. -d "firefox,1.8.1-test, firefox,1.8.1-test, firefox,1.9.0-test, firefox,1.9.0-test,"

where $TEST_DIR/data/firefox,1.8.1, would contain (at least)


and so on. is a dispatcher-like script which is designed to setup a test environment, download and install or build, create profiles, initialize preferences, install extensions or plugins,...) and make a test run for each of the specified datafile combinations. Although it can be called directly, it is better and more commonly used in a wrapper script. See JavaScript Tests' for an example.

usage: -t testscript [-v ] datalist1 [datalist2 [datalist3 [datalist4]]]

variable            description
===============     ===========================================================
-t testscript       required. quoted test script with required arguments.
-v                  optional. verbose - copies log file output to stdout.

executes the testscript for each input data file in 
constructed from each combination of the input parameters.

where item1 belongs to datalist1, etc.

Environment Variables

  • BUILDDIR=${BUILDDIR:-/work/mozilla/builds}

The location of the Sisyphus build directory


When non-null, causes debugging messages to be output by the various scripts.


Controls whether crash reports are sent in Gecko 1.9.0 and later. This only has an effect for nightly builds which are downloaded and installed.


Controls the time in seconds a build will wait after crashing before terminating.

  • TEST_HTTP=${}

The web server used in browser tests.


The path to the local clones of the mercurial repositories used in builds.

The default mercurial repository.


The time in seconds that Sisyphus will wait for the browser to complete loading an initialization page.


The number of times Sisyphus will attempt to load the Spider extension in the browser before giving up.


Contols whether debug dialogs, stacks or warnings are generated when an assertion occurs in the browser. If set to stack, and if, are found on the PATH, they will be used to post process the logs to create Stacks containing symbols from the tested build.

Back to Sisyphus