Sisyphus - Script Reference: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
platformBuildID
platformBuildID
</pre>
</pre>
== 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.
<pre><nowiki>
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
</nowiki></pre>


== builder.sh ==
== 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.
User facing Bash script which can checkout, build or clean Firefox for each of the specified products, branches, and build types.


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
builder.sh -p products -b branches -B buildcommands -T buildtypes [-e extra] [-v]
builder.sh -p products -b branches -B buildcommands -T buildtypes [-e extra] [-v] -X processortype


variable            description
variable            description
===============    ===========================================================
===============    ===========================================================
-p products        required. one or more of js firefox thunderbird
-p products        required. one or more of firefox
-b branches        required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1
-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
-B buildcommands    required. one or more of clean checkout build
-T buildtypes      required. one or more of opt debug
-T buildtypes      required. one or more of opt debug
-e extra            optional. extra qualifier to pick build tree and mozconfig.
-e extra            optional. extra qualifier to pick build tree and mozconfig.
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.
-v                  optional. verbose - copies log file output to stdout.
-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  
note that the environment variables should have the same names as in the
"variable" column.
"variable" column.
</nowiki></pre>
</nowiki></pre>


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:
For example, to clean, checkout and build opt and debug builds of the Firefox beta, aurora, nightly branches, you would call builder.sh as:


<pre>
<pre>
builder.sh -p "js firefox thunderbird" -b "1.8.1 1.9.0" -T "opt debug" -B "clean checkout build"  
builder.sh -p "firefox" -b "beta aurora nightly" -T "opt debug" -B "clobber checkout build"
</pre>
</pre>


== buildinfo.html ==
== buildinfo.html ==


Utility HTML page which including appinfo.js and displays (new AppInfo()).toSource())  
Utility HTML page which including appinfo.js and displays (new AppInfo()).toSource())


== build.sh ==
== check-spider.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.
Utility Bash script which is used by <code>smoke-build.sh</code> and <code>test-setup.sh</code> to check that the Spider extension has been installed.


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
build.sh -p product -b branch -T buildtype [-e extra]
check-spider.sh -p product -b branch -x executablepath -N profilename
      [-d datafiles]


variable       description
variable           description
============   ===========================================================
===============    ============================================================
-p product     required. one or more of js firefox thunderbird
-p product         required. one of firefox thunderbird
-b branch       required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1
-b branch           required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release,
-T buildtype    required. one or more of opt debug
                    beta, aurora, nightly, tracemonkey
-e extra        optional. extra qualifier to pick mozconfig and tree
-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.
</nowiki></pre>
</nowiki></pre>


== checkout.sh ==
== 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.
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.


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
checkout.sh -p product -b branch -T buildtype [-e extra]
checkout.sh -p product -b branch -T buildtype [-e extra]


variable        description
variable        description
============    ===========================================================
============    ===========================================================
-p product      required. one or more of js firefox thunderbird
-p product      required. one or more of firefox
-b branch      required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1
-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
-T buildtype    required. one or more of opt debug
-e extra        optional. extra qualifier to pick mozconfig and tree
-e extra        optional. extra qualifier to pick mozconfig and tree
</nowiki></pre>
</nowiki></pre>


== check-spider.sh ==
== clean.sh ==


Utility Bash script which is used by <code>smoke-build.sh</code> and <code>test-setup.sh</code> to check that the Spider extension has been installed.
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.


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
check-spider.sh -p product -b branch -x executablepath -N profilename
clean.sh -p product -b branch -T buildtype [-e extra]
      [-d datafiles]


variable           description
variable       description
===============    ============================================================
============   ===========================================================
-p product         required. one of firefox thunderbird
-p product     required. one or more of firefox
-b branch           required. one of 1.8.0 1.8.1 1.9.0 1.9.1
-b branch       required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release,
-x executablepath  required. directory-tree containing executable named
                beta, aurora, nightly, tracemonkey
                    'product'
-T buildtype    required. one or more of opt debug
-N profilename      required. name of profile to be used
-e extra       optional. extra qualifier to pick mozconfig and tree
-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.
</nowiki></pre>
</nowiki></pre>


== clobber.sh ==


== clean.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.
 
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.


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
clean.sh -p product -b branch -T buildtype [-e extra]
clean.sh -p product -b branch -T buildtype [-e extra]


variable        description
variable        description
============    ===========================================================
============    ===========================================================
-p product      required. one or more of js firefox thunderbird
-p product      required. one or more of firefox
-b branch      required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1
-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
-T buildtype    required. one or more of opt debug
-e extra        optional. extra qualifier to pick mozconfig and tree
-e extra        optional. extra qualifier to pick mozconfig and tree
Line 129: Line 153:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
combo.sh [-d delim] list1 [list2 [list3 [list4]]]
combo.sh [-d delim] list1 [list2 [list3 [list4]]]


Line 136: Line 160:
-d delim specifies the delimiter. The default is comma (,).
-d delim specifies the delimiter. The default is comma (,).


.sh "a b"  
.sh "a b"
a
a
b
b


combo.ah "a b" "1 2"  
combo.ah "a b" "1 2"
a,1  
a,1
a,2  
a,2
b,1  
b,1
b,2
b,2


combo.ah -d "-" "a b" "1 2"  
combo.ah -d "-" "a b" "1 2"
a-1  
a-1
a-2  
a-2
b-1  
b-1
b-2
b-2
</nowiki></pre>
</nowiki></pre>
Line 159: Line 183:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
create-directory.sh -d directory [-n]  
create-directory.sh -d directory [-n]


-d directory    directory to be created.
-d directory    directory to be created.
Line 166: Line 190:


Attempts to safely create an empty directory. If -n is not
Attempts to safely create an empty directory. If -n is not
specified, the script will prompt before deleting any files  
specified, the script will prompt before deleting any files
or directories. If -n is specified, it will not prompt.
or directories. If -n is specified, it will not prompt.


The safety measures include refusing to run if run by user
The safety measures include refusing to run if run by user
root and by refusing to create directories unless there are  
root and by refusing to create directories unless there are
a subdirectory of /tmp or have at least two ancestor  
a subdirectory of /tmp or have at least two ancestor
directories... /grandparent/parent/child.
directories... /grandparent/parent/child.


Line 187: Line 211:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
create-profile.sh -p product -b branch -x executablepath -D directory -N profilename  
create-profile.sh -p product -b branch -x executablepath -D directory -N profilename
       [-L profiletemplate] [-U user] [-d datafiles]
       [-L profiletemplate] [-U user] [-d datafiles]


variable            description
variable            description
===============    ============================================================
===============    ============================================================
-p product          required. firefox|thunderbird
-p product          required. firefox
-b branch          required. 1.8.0|1.8.1|1.9.0|1.9.1
-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'
-x executablepath  required. directory-tree containing executable 'product'
-D directory        required. directory where profile is to be created.
-D directory        required. directory where profile is to be created.
-N profilename      required. profile name  
-N profilename      required. profile name
-L profiletemplate  optional. location of a template profile to be used.  
-L profiletemplate  optional. location of a template profile to be used.
-U user            optional. user.js preferences file.
-U user            optional. user.js preferences file.
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.


note that the environment variables should have the same names as in the  
note that the environment variables should have the same names as in the
"variable" column.
"variable" column.
</nowiki></pre>
</nowiki></pre>


== dateparse.pl ==
Script which will use str2time to convert a date time string to a standard
format.
usage: dateparse.pl datestring


== download.sh ==
== download.sh ==
Line 213: Line 244:


<pre><nowiki>
<pre><nowiki>
download.sh  
download.sh


usage:  
usage:
download.sh -u url [-c credentials] -f filepath [-t timeout] [-d datafiles]
download.sh -u url [-c credentials] -f filepath [-t timeout] [-d datafiles]


Line 225: Line 256:
-t timeout          optional. timeout in seconds before download fails.
-t timeout          optional. timeout in seconds before download fails.
                     default 300 seconds
                     default 300 seconds
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.


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


Line 237: Line 268:
</nowiki></pre>
</nowiki></pre>


== each-to-html.pl ==
== firefox.diff ==


obsolete XXX remove
Utility Patch to firefox shell script to perform an exec run-mozilla.sh in order to not fork another process.
 
== 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.
 
<pre><nowiki>
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
== fix_stack+_using_bpsyms.py ==
"variable" column.
</nowiki></pre>


 
Modified script based on [http://mxr.mozilla.org/mozilla-central/source/tools/rb/fix_stack_using_bpsyms.py
== firefox.diff ==
mozilla central's fix_stack_using_bpsyms.py] which is used to create human readable stacks for ASSERTIONs.
 
Utility Patch to firefox shell script to perform an exec run-mozilla.sh in order to not fork another process.


== get-build-info.html ==
== get-build-info.html ==


Utility HTML page which includes <code>appinfo.js</code> and <code>quit.js</code> and displays (new AppInfo()).toSource()) then calls goQuitApplication() to terminate the program.
Utility HTML page which includes <code>appinfo.js</code> and <code>quit.js</code> and displays (new AppInfo()).toSource()) then calls goQuitApplication() to terminate the program.


== hdiutil-expect.ex ==  
== get-extension-uuid.pl ==
 
Utility expect script to accept license agreement when mounting a <i>dmg</i> Firefox or Thunderbird installer on Mac OS X.


== include.mk ==
Utility script which prints the uuid of a extension to stdout.


obsolete. XXX remove.
usage: get-extension-uuid.pl extensionrdfpath


== install-build.sh ==
== install-build.sh ==


Utility bash script to install a Firefox, Thunderbird build.
Utility bash script to install a Firefox build.


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
install-build.sh -p product -b branch  -x executablepath -f filename [-d datafiles]
install-build.sh -p product -b branch  -x executablepath -f filename [-d datafiles]


variable            description
variable            description
===============    ============================================================
===============    ============================================================
-p product          required. firefox|thunderbird
-p product          required. firefox
-b branch          required. 1.8.0|1.8.1|1.9.0|1.9.1
-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
-x executablepath  required. directory where to install build
-f filename        required. path to filename where installer is stored
-f filename        required. path to filename where installer is stored
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.


note that the environment variables should have the same names as in the  
note that the environment variables should have the same names as in the
"variable" column.
"variable" column.
</nowiki></pre>
</nowiki></pre>


== install-extensions-1.html ==
== 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.
Utility HTML page used to initialize installed extensions since the framework specifies NO_EM_RESTART which prevents normal extension initialization.
Line 319: Line 318:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
install-extensions.sh -p product -b branch -x executablepath -N profilename -E extensions  
install-extensions.sh -p product -b branch -x executablepath -N profilename -E extensions
       [-d datafiles]
       [-d datafiles]


variable            description
variable            description
===============    ============================================================
===============    ============================================================
-p product          required. firefox|thunderbird
-p product          required. firefox
-b branch          required. 1.8.0|1.8.1|1.9.0|1.9.1
-b branch          required. one or more of 1.9.0, 1.9.1, 1.9.2, 2.0.0, release,
-x executablepath  required. directory-tree containing executable named  
                    beta, aurora, nightly, tracemonkey
-x executablepath  required. directory-tree containing executable named
                     'product'
                     'product'
-N profilename      required. profile name  
-N profilename      required. profile name
-E extensions      required. path to directory containing xpis to be installed
-E extensions      required. path to directory containing xpis to be installed
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.


note that the environment variables should have the same names as in the  
note that the environment variables should have the same names as in the
"variable" column.
"variable" column.
</nowiki></pre>
</nowiki></pre>
Line 344: Line 344:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
install-plugins.sh -p product -b branch -x executablepath -D directory [-d datafiles]
install-plugins.sh -p product -b branch -x executablepath -D directory [-d datafiles]


variable            description
variable            description
===============    ============================================================
===============    ============================================================
-p product          required. firefox|thunderbird
-p product          required. firefox
-b branch          required. 1.8.0|1.8.1|1.9.0|1.9.1
-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
-x executablepath  required. path to browser executable
-D directory        required. path to location of plugins/components
-D directory        required. path to location of plugins/components
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment  
                     environment
                     variable definitions to be included.
                     variable definitions to be included.


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


Line 391: Line 392:
usage: set-build-env.sh -p product -b branch -T buildtype [-e extra]
usage: set-build-env.sh -p product -b branch -T buildtype [-e extra]


-p product      [firefox|thunderbird]
-p product      firefox
-b branch      [1.8.0|1.8.1|1.9.0|1.9.1]
-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]
-T buildtype    [opt|debug]
-e extra        extra qualifier to pick mozconfig and tree
-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.
</pre></nowiki>
</pre></nowiki>


== set-msvc6-env.sh ==
== set-msvc-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?
Utility script to set the build environment on Windows.
 
<pre><nowiki>
usage:
 
smoke-build.sh installer [installer...]
</nowiki></pre>
 
== spider.pl ==
 
Utility Perl script to invoke the Spider extension with a set of paramters. Obsolete. XXX remove.


== start-spider.html ==
== start-spider.html ==
Line 423: Line 410:
Utility HTML page used by check-spider.sh.
Utility HTML page used by check-spider.sh.


== tester.sh ==
== suppressions.py ==


Utility bash script to setup and run a test.  The <i>testscript</i> 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 <code>combo.sh</code>, which contain the required arguments specified as environment variables.
Collect valgrind suppression rules from stdin and write unique sorted list of suppression rules to stdout.
 
For example,
 
<pre><nowiki>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'</nowiki></pre>
 
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)
 
<pre><nowiki>bin/tester.sh -t "$TEST_DIR/tests/mozilla.org/js/test.sh" "js firefox" "1.8.1 1.9.0" "opt debug"</nowiki></pre>
 
 
<pre><nowiki>
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}
</nowiki></pre>


Usage: cat file [file...] | python suppressions.py > valgrind.sup


== test-setup.sh ==
== test-setup.sh ==
Line 459: Line 421:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
test-setup.sh -p product -b branch
test-setup.sh -p product -b branch
       [-u url [-f filepath] [-c credentials]]  
       [-u url [-f filepath] [-c credentials]]
       [-B buildcommands -T buildtype]  
       [-B buildcommands -T buildtype]
       [-x executablepath]
       [-x executablepath]
       [-N profilename [-D profiledirectory [-L profiletemplate  
       [-N profilename [-D profiledirectory [-L profiletemplate
         [-U userpreferences]]]]
         [-U userpreferences]]]]
       [-E extensiondir]
       [-E extensiondir]
       [-d datafiles]  
       [-d datafiles]


variable            description
variable            description
===============    ===========================================================
===============    ===========================================================
-p product          required. one of firefox thunderbird
-p product          required. one of firefox
-b branch          required. one of 1.8.0 1.8.1 1.9.0 1.9.1
-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
-u url              optional. url where to download build
-f filepath        optional. location to save downloaded build or to find
-f filepath        optional. location to save downloaded build or to find
Line 481: Line 444:
-B buildcommands    optional. one or more of clean checkout build
-B buildcommands    optional. one or more of clean checkout build
-T buildtype        optional. one of opt debug
-T buildtype        optional. one of opt debug
-x executablepath  optional. directory tree containing executable with same  
-x executablepath  optional. directory tree containing executable with same
                     name as product. If the build is downloaded and executable  
                     name as product. If the build is downloaded and executable
                     path is not specified, it will be defaulted to  
                     path is not specified, it will be defaulted to
                     /tmp/$product-$branch.  
                     /tmp/$product-$branch.
                     For cvs builds it will be defaulted to the appropriate  
                     For cvs builds it will be defaulted to the appropriate
                     directory in  
                     directory in
                     /work/mozilla/builds/$branch/mozilla/$product-$buildtype/
                     /work/mozilla/builds/$branch/mozilla/$product-$buildtype/
-N profilename      optional. profilename. profilename is required if  
-N profilename      optional. profilename. profilename is required if
                     profiledirectory or extensiondir are specified.
                     profiledirectory or extensiondir are specified.
-D profiledirectory optional. If profiledirectory is specified, a new profile  
-D profiledirectory optional. If profiledirectory is specified, a new profile
                     will be created in the directory.
                     will be created in the directory.
-L profiletemplate  optional. If a new profile is created, profiletemplate is  
-L profiletemplate  optional. If a new profile is created, profiletemplate is
                     the path to an existing profile which will be copied over  
                     the path to an existing profile which will be copied over
                     the new profile.
                     the new profile.
-U userpreferences  optional. If a new profile is created, userpreferences is  
-U userpreferences  optional. If a new profile is created, userpreferences is
                     the path to a user.js file to be copied into the new  
                     the path to a user.js file to be copied into the new
                     profile.
                     profile.
                     If userpreferences is not specified when a new profile is  
                     If userpreferences is not specified when a new profile is
                     created, it is defaulted to
                     created, it is defaulted to
                     /work/mozilla/mozilla.com/test.mozilla.com/www/prefs/test-user.js
                     /work/mozilla/mozilla.com/test.mozilla.com/www/prefs/test-user.js
-E extensiondir    optional. path to directory tree containing extensions to  
-E extensiondir    optional. path to directory tree containing extensions to
                     be installed.
                     be installed.
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.


note that the environment variables should have the same  
note that the environment variables should have the same
names as in the "variable" column.
names as in the "variable" column.
</nowiki></pre>
</nowiki></pre>




== thunderbird.diff ==
== tester.sh ==
 
Utility bash script to setup and run a test.  The <i>testscript</i> 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 <code>combo.sh</code>, which contain the required arguments specified as environment variables.
 
For example,
 
<pre><nowiki>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'</nowiki></pre>
 
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)
 
<pre><nowiki>bin/tester.sh -t "$TEST_DIR/tests/mozilla.org/js/test.sh" "js firefox" "1.8.1 1.9.0" "opt debug"</nowiki></pre>
 
 
<pre><nowiki>
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}
</nowiki></pre>


Utility Patch to thunderbird shell script to perform an exec run-mozilla.sh in order to not fork another process.


== timed_run.py ==
== 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.  
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.




Line 528: Line 518:
===============    ===========================================================
===============    ===========================================================
timeout            timeout period in seconds.
timeout            timeout period in seconds.
prefix              string to be used to prefix the exit status line.  
prefix              string to be used to prefix the exit status line.
</nowiki></pre>
</nowiki></pre>


Line 535: Line 525:
NORMAL                    - zero exit code
NORMAL                    - zero exit code
ABNORMAL rc                - non-zero exit code rc but no signal
ABNORMAL rc                - non-zero exit code rc but no signal
CRASHED signal sig signame - zero exit code but signal  
CRASHED signal sig signame - zero exit code but signal


Examples:
Examples:
Line 562: Line 552:


<pre><nowiki>
<pre><nowiki>
usage:  
usage:
uninstall-build.sh -p product -b branch  -x executablepath [-d datafiles]
uninstall-build.sh -p product -b branch  -x executablepath [-d datafiles]


variable            description
variable            description
===============    ============================================================
===============    ============================================================
-p product          required. firefox|thunderbird
-p product          required. firefox
-b branch          required. 1.8.0|1.8.1|1.9.0|1.9.1
-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
-x executablepath  required. directory where build is installed
-d datafiles        optional. one or more filenames of files containing  
-d datafiles        optional. one or more filenames of files containing
                     environment variable definitions to be included.
                     environment variable definitions to be included.


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


Uninstalls build located in directory-tree 'executablepath'
Uninstalls build located in directory-tree 'executablepath'
then removes the directory upon completion.
then removes the directory upon completion.
</nowiki></pre>
== uninstall-extensions.sh ==
<pre><nowiki>
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.
</nowiki></pre>
</nowiki></pre>



Revision as of 21:59, 18 April 2012

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