Sisyphus - Script Reference
appinfo.js
Utility JavaScript used by buildinfo.html and get-build-info.html to implement the JavaScript object AppInfo which collects build information from nsIXULAppInfo.
Properties:
vendor name ID appBuildID platformVersion platformBuildID
builder.sh
User facing Bash script which can checkout, build or clean Firefox, Thunderbird or the JavaScript shell for each of the specified products, branches, and build types.
usage:
builder.sh -p products -b branches -B buildcommands -T buildtypes [-e extra] [-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.
For example, to clean, checkout and build opt and debug builds of the JavaScript shell, Firefox and Thunderbird for the 1.8.1 and 1.9.0 branches, you would call builder.sh as:
builder.sh -p "js firefox thunderbird" -b "1.8.1 1.9.0" -T "opt debug" -B "clean checkout build"
buildinfo.html
Utility HTML page which including appinfo.js and displays (new AppInfo()).toSource())
build.sh
Utility Bash script which builds Firefox, Thunderbird or the JavaScript shell. This script is intended to be called from other scripts such as builder.sh or test-setup.sh.
usage: build.sh -p product -b branch -T buildtype [-e extra] variable description ============ =========================================================== -p product required. one or more of js firefox thunderbird -b branch required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1 -T buildtype required. one or more of opt debug -e extra optional. extra qualifier to pick mozconfig and tree
checkout.sh
Utility Bash script which checks out the source for Firefox, Thunderbird or the JavaScript shell. This script is intended to be called from other scripts such as builder.sh or test-setup.sh.
usage: checkout.sh -p product -b branch -T buildtype [-e extra] variable description ============ =========================================================== -p product required. one or more of js firefox thunderbird -b branch required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1 -T buildtype required. one or more of opt debug -e extra optional. extra qualifier to pick mozconfig and tree
check-spider.sh
Utility Bash script which is used by smoke-build.sh and test-setup.sh to check that the Spider extension has been installed.
usage:
check-spider.sh -p product -b branch -x executablepath -N profilename
[-d datafiles]
variable description
=============== ============================================================
-p product required. one of firefox thunderbird
-b branch required. one of 1.8.0 1.8.1 1.9.0 1.9.1
-x executablepath required. directory-tree containing executable named
'product'
-N profilename required. name of profile to be used
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
Checks if the Spider extension is installed either in the named profile
or as a global extension, by attempting up to 3 times to launch the Spider.
If Spider fails to launch, the script returns exit code 2.
clean.sh
Utility Bash script which performs a clean on the source for Firefox, Thunderbird or the JavaScript shell. This script is intended to be called from other scripts such as builder.sh or test-setup.sh.
usage: clean.sh -p product -b branch -T buildtype [-e extra] variable description ============ =========================================================== -p product required. one or more of js firefox thunderbird -b branch required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1 -T buildtype required. one or more of opt debug -e extra optional. extra qualifier to pick mozconfig and tree
combo.sh
Bash script which is used by tester.sh to generate combinations of file names. This is not a user facing script.
usage: combo.sh [-d delim] list1 [list2 [list3 [list4]]] output combinations of items in each list using delim as the delimiter -d delim specifies the delimiter. The default is comma (,). .sh "a b" a b combo.ah "a b" "1 2" a,1 a,2 b,1 b,2 combo.ah -d "-" "a b" "1 2" a-1 a-2 b-1 b-2
create-directory.sh
Utility Bash script to safely create directories used by create-profile.sh, edit-talkback.sh, install-build.sh, and uninstall-build.sh.
usage: create-directory.sh -d directory [-n] -d directory directory to be created. -n never prompt when removing existing directory. Attempts to safely create an empty directory. If -n is not specified, the script will prompt before deleting any files or directories. If -n is specified, it will not prompt. The safety measures include refusing to run if run by user root and by refusing to create directories unless there are a subdirectory of /tmp or have at least two ancestor directories... /grandparent/parent/child. ******************** WARNING ******************** This script will destroy existing directories and their contents. It can potentially wipe out your disk. Use with caution. ******************** WARNING ********************
create-profile.sh
Utility Bash script used to create a profile used by smoke-build.sh, test-setup.sh.
usage:
create-profile.sh -p product -b branch -x executablepath -D directory -N profilename
[-L profiletemplate] [-U user] [-d datafiles]
variable description
=============== ============================================================
-p product required. firefox|thunderbird
-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
-x executablepath required. directory-tree containing executable 'product'
-D directory required. directory where profile is to be created.
-N profilename required. profile name
-L profiletemplate optional. location of a template profile to be used.
-U user optional. user.js preferences file.
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
download.sh
Utility Bash script used by test-setup.sh to download a file.
download.sh
usage:
download.sh -u url [-c credentials] -f filepath [-t timeout] [-d datafiles]
variable description
=============== ============================================================
-u url required. url to download build from
-c credentials optional. username:password
-f filepath required. path to filename to store downloaded file
-t timeout optional. timeout in seconds before download fails.
default 300 seconds
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
downloads file from url with optional authentication credentials
saving the file to filepath. If the path to the file does not exist,
it is created. If the download takes longer than timeout seconds,
the download is cancelled.
each-to-html.pl
obsolete XXX remove
edit-talkback.pl
Utility Perl script to update Talkback to perform automatic crash reports. Obsolete, replaced by edit-talkback.sh. XXX remove.
edit-talkback.sh
Utility Perl script to update Talkback to perform automatic crash reports.
usage:
edit-talkback.sh -p product -b branch -x executablepath -i talkbackid [-d datafiles]
variable description
=============== ============================================================
-p product required. firefox|thunderbird
-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
-x executablepath required. directory-tree containing executable named
'product'
-i talkbackid required. identifier to add to talkback url
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
firefox.diff
Utility Patch to firefox shell script to perform an exec run-mozilla.sh in order to not fork another process.
get-build-info.html
Utility HTML page which includes appinfo.js and quit.js and displays (new AppInfo()).toSource()) then calls goQuitApplication() to terminate the program.
hdiutil-expect.ex
Utility expect script to accept license agreement when mounting a dmg Firefox or Thunderbird installer on Mac OS X.
include.mk
obsolete. XXX remove.
install-build.sh
Utility bash script to install a Firefox, Thunderbird build.
usage:
install-build.sh -p product -b branch -x executablepath -f filename [-d datafiles]
variable description
=============== ============================================================
-p product required. firefox|thunderbird
-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
-x executablepath required. directory where to install build
-f filename required. path to filename where installer is stored
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
install-extensions-1.html
Utility HTML page used to initialize installed extensions since the framework specifies NO_EM_RESTART which prevents normal extension initialization.
install-extensions-2.html
Utility HTML page used to initialize installed extensions since the framework specifies NO_EM_RESTART which prevents normal extension initialization.
install-extensions.sh
Utility bash script to perform a global installation of the extensions located in extensions/all and extensions/platform.
usage:
install-extensions.sh -p product -b branch -x executablepath -N profilename -E extensions
[-d datafiles]
variable description
=============== ============================================================
-p product required. firefox|thunderbird
-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
-x executablepath required. directory-tree containing executable named
'product'
-N profilename required. profile name
-E extensions required. path to directory containing xpis to be installed
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
install-plugins.sh
Utility bash script to perform a global installation of the plugins located in directory. directory should contain the files which the plugin's installer installed into the executable directory.
usage:
install-plugins.sh -p product -b branch -x executablepath -D directory [-d datafiles]
variable description
=============== ============================================================
-p product required. firefox|thunderbird
-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
-x executablepath required. path to browser executable
-D directory required. path to location of plugins/components
-d datafiles optional. one or more filenames of files containing
environment
variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
library.sh
Utility bash script which is used by other scripts to set the functions and environment varaibles used by the other bash scripts.
master.sed
Utility sed script to edit Talkback master.ini files to perform automatic submission of crash reports.
quit.js
Utility JavaScript which implements the function goQuitApplication().
run-mozilla.diff
Utility Patch to run-mozilla.sh shell script to perform an exec on the executable program in order to not fork another process.
sayvars.sh
Utility bash script to echo environment variables of the form TEST_... to the test log.
set-build-env.sh
Utility script to set the build environment for the specified product, branch, buildtype and tree.
<nowiki> usage: set-build-env.sh -p product -b branch -T buildtype [-e extra] -p product [firefox|thunderbird] -b branch [1.8.0|1.8.1|1.9.0|1.9.1] -T buildtype [opt|debug] -e extra extra qualifier to pick mozconfig and tree
</nowiki>
set-msvc6-env.sh
Utility script to set the build environment on Windows for Gecko 1.8 and earlier using Microsoft Visual Studio 6.
set-msvc8-env.sh
Utility script to set the build environment on Windows for Gecko 1.9 and later using Microsoft Visual Studio 2005.
smoke-build.sh
Demonstration script to install, create profile, install extensions, and invoke the Spider extension for each build specified on the command line. Obsolete?
usage: smoke-build.sh installer [installer...]
spider.pl
Utility Perl script to invoke the Spider extension with a set of paramters. Obsolete. XXX remove.
start-spider.html
Utility HTML page used by check-spider.sh.
tester.sh
Utility bash script to setup and run a test. The testscript argument is a possibly quoted string containing the path to a test script along with any arguments. The datalist arguments can optionally be used to produce a list of data files names, created via combo.sh, which contain the required arguments specified as environment variables.
For example,
bin/tester.sh -t "$TEST_DIR/tests/mozilla.org/js/test.sh -p 'js firefox' -b '1.8.1 1.9.0' -T 'opt debug'
which will build optimized and debug builds of the JavaScript shell and Firefox for branches 1.8.1 and 1.9.0 and then run the JavaScript tests in the shell and browser.
or equivalently (if the appropriate data files data/js,1.8.1,opt.data, ..., firefox,1.8.1,opt.data ... exist)
bin/tester.sh -t "$TEST_DIR/tests/mozilla.org/js/test.sh" "js firefox" "1.8.1 1.9.0" "opt debug"
usage:
tester.sh -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 using the input data files in
/work/mozilla/mozilla.com/test.mozilla.com/www/data constructed from each combination of the input parameters:
{item1},{item2},{item3},{item4}
test-setup.sh
Utility bash script used by tester.sh to set up a test by either downloading or building a build, creating a profile, setting preferences, and installing extensions.
usage:
test-setup.sh -p product -b branch
[-u url [-f filepath] [-c credentials]]
[-B buildcommands -T buildtype]
[-x executablepath]
[-N profilename [-D profiledirectory [-L profiletemplate
[-U userpreferences]]]]
[-E extensiondir]
[-d datafiles]
variable description
=============== ===========================================================
-p product required. one of firefox thunderbird
-b branch required. one of 1.8.0 1.8.1 1.9.0 1.9.1
-u url optional. url where to download build
-f filepath optional. location to save downloaded build or to find
previously downloaded build. If not specified, the
default will be the basename of the url saved to the
/tmp directory. If there is no basename, then the
filepath will be /tmp/$product-$branch-file.
-B buildcommands optional. one or more of clean checkout build
-T buildtype optional. one of opt debug
-x executablepath optional. directory tree containing executable with same
name as product. If the build is downloaded and executable
path is not specified, it will be defaulted to
/tmp/$product-$branch.
For cvs builds it will be defaulted to the appropriate
directory in
/work/mozilla/builds/$branch/mozilla/$product-$buildtype/
-N profilename optional. profilename. profilename is required if
profiledirectory or extensiondir are specified.
-D profiledirectory optional. If profiledirectory is specified, a new profile
will be created in the directory.
-L profiletemplate optional. If a new profile is created, profiletemplate is
the path to an existing profile which will be copied over
the new profile.
-U userpreferences optional. If a new profile is created, userpreferences is
the path to a user.js file to be copied into the new
profile.
If userpreferences is not specified when a new profile is
created, it is defaulted to
/work/mozilla/mozilla.com/test.mozilla.com/www/prefs/test-user.js
-E extensiondir optional. path to directory tree containing extensions to
be installed.
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same
names as in the "variable" column.
thunderbird.diff
Utility Patch to thunderbird shell script to perform an exec run-mozilla.sh in order to not fork another process.
timed_run.py
Utility Python script to execute a program, optionally kill the program if it does not terminate and to output an EXIT STATUS line to stdout.
usage: timed_run.py timeout prefix command [arguments] variable description =============== =========================================================== timeout timeout period in seconds. prefix string to be used to prefix the exit status line.
The EXIT STATUS line has the form prefix: EXIT STATUS: status (time seconds). status can be one of
NORMAL - zero exit code ABNORMAL rc - non-zero exit code rc but no signal CRASHED signal sig signame - zero exit code but signal
Examples:
$ bin/timed_run.py 30 'FOO' bash -c "echo before; sleep 10; echo after;" before after FOO: EXIT STATUS: NORMAL (10.004925 seconds) bclary@sophie /work/mozilla/mozilla.com/test.mozilla.com/www $ bin/timed_run.py 30 'FOO' bash -c "echo before; sleep 40; echo after;" before FOO: EXIT STATUS: TIMED OUT (30.0011630058 seconds) $ bin/timed_run.py 30 'FOO' bash -c 'echo before; kill -9 $$; echo after'; before FOO: EXIT STATUS: CRASHED signal 9 SIGKILL (0.002716 seconds)
uninstall-build.sh
usage:
uninstall-build.sh -p product -b branch -x executablepath [-d datafiles]
variable description
=============== ============================================================
-p product required. firefox|thunderbird
-b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
-x executablepath required. directory where build is installed
-d datafiles optional. one or more filenames of files containing
environment variable definitions to be included.
note that the environment variables should have the same names as in the
"variable" column.
Uninstalls build located in directory-tree 'executablepath'
then removes the directory upon completion.
userhook-checkspider.js
Utility JavaScript used by check-spider.sh to test if the Spider extension is installed properly.
Back to Sisyphus