Sisyphus/Scripts
Contents
- 1 appinfo.js
- 2 build.sh
- 3 builder.sh
- 4 buildinfo.html
- 5 check-spider.sh
- 6 checkout.sh
- 7 clean.sh
- 8 clobber.sh
- 9 combo.sh
- 10 create-directory.sh
- 11 create-profile.sh
- 12 dateparse.pl
- 13 download.sh
- 14 firefox.diff
- 15 fix_stack+_using_bpsyms.py
- 16 get-build-info.html
- 17 get-extension-uuid.pl
- 18 install-build.sh
- 19 install-extensions-1.html
- 20 install-extensions.sh
- 21 install-plugins.sh
- 22 library.sh
- 23 master.sed
- 24 quit.js
- 25 run-mozilla.diff
- 26 sayvars.sh
- 27 set-build-env.sh
- 28 set-msvc-env.sh
- 29 start-spider.html
- 30 suppressions.py
- 31 test-setup.sh
- 32 tester.sh
- 33 timed_run.py
- 34 uninstall-build.sh
- 35 uninstall-extensions.sh
- 36 userhook-checkspider.js
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
build.sh
Utility Bash script which builds Firefox. 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] -X processortype variable description ============ =========================================================== -p product required. one or more of firefox -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -T buildtype required. one or more of opt debug -e extra optional. extra qualifier to pick mozconfig and tree -X processortype intel32, intel64, amd32, amd64, ppc
builder.sh
User facing Bash script which can checkout, build or clean Firefox for each of the specified products, branches, and build types.
usage: builder.sh -p products -b branches -B buildcommands -T buildtypes [-e extra] [-v] -X processortype variable description =============== =========================================================== -p products required. one or more of firefox -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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. -X processortype intel32, intel64, amd32, amd64, ppc 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 Firefox beta, aurora, nightly branches, you would call builder.sh as:
builder.sh -p "firefox" -b "beta aurora nightly" -T "opt debug" -B "clobber checkout build"
buildinfo.html
Utility HTML page which including appinfo.js and displays (new AppInfo()).toSource())
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 or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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.
checkout.sh
Utility Bash script which checks out the source for Firefox. 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 firefox -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -T buildtype required. one or more of opt debug -e extra optional. extra qualifier to pick mozconfig and tree
clean.sh
Utility Bash script which performs a clean on the source for Firefox. 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 firefox -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -T buildtype required. one or more of opt debug -e extra optional. extra qualifier to pick mozconfig and tree
clobber.sh
Utility Bash script which performs a clobber on the source for Firefox. 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 firefox -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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 -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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.
dateparse.pl
Script which will use str2time to convert a date time string to a standard format.
usage: dateparse.pl datestring
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.
firefox.diff
Utility Patch to firefox shell script to perform an exec run-mozilla.sh in order to not fork another process.
fix_stack+_using_bpsyms.py
Modified script based on [http://mxr.mozilla.org/mozilla-central/source/tools/rb/fix_stack_using_bpsyms.py mozilla central's fix_stack_using_bpsyms.py] which is used to create human readable stacks for ASSERTIONs.
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.
get-extension-uuid.pl
Utility script which prints the uuid of a extension to stdout.
usage: get-extension-uuid.pl extensionrdfpath
install-build.sh
Utility bash script to install a Firefox build.
usage: install-build.sh -p product -b branch -x executablepath -f filename [-d datafiles] variable description =============== ============================================================ -p product required. firefox -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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.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 -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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 -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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 -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -T buildtype [opt|debug] -e extra extra qualifier to pick mozconfig and tree -X processortype processor type: intel32, intel64, amd32, amd64, ppc -c commands quoted text string containing options commands to be executed using the build environment's shell.</nowiki>
set-msvc-env.sh
Utility script to set the build environment on Windows.
start-spider.html
Utility HTML page used by check-spider.sh.
suppressions.py
Collect valgrind suppression rules from stdin and write unique sorted list of suppression rules to stdout.
Usage: cat file [file...] | python suppressions.py > valgrind.sup
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 -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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.
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}
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 -b branch required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release, beta, aurora, nightly, tracemonkey -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.
uninstall-extensions.sh
Uninstalls extension located in directory-tree 'executablepath' then removes the directory upon completion. usage: uninstall-extensions.sh -p product -b branch -x executablepath -N profilename -E extensiondir [-d datafiles] variable description =============== ============================================================ -p product required. firefox. -b branch required. one of 1.9.0 1.9.1 1.9.2 2.0.0 release beta aurora nightly tracemonkey. -x executablepath required. directory-tree containing executable named 'product' -N profilename required. profile name -E extensiondir 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.
userhook-checkspider.js
Utility JavaScript used by check-spider.sh to test if the Spider extension is installed properly.
Back to Sisyphus