ReleaseEngineering/TryChooser: Difference between revisions

Redirected page to ReleaseEngineering/TryServer
(Redirected page to ReleaseEngineering/TryServer)
 
(43 intermediate revisions by 29 users not shown)
Line 1: Line 1:
TryChooser lets you select specific jobs you want to run on tryserver.  You use TryChooser by putting a <tt>try:</tt> block at the end of the topmost commit message when you push to try.
#REDIRECT [[ReleaseEngineering/TryServer]]
==Syntax Builder==
To simplify using the TryChooser, you can use the [http://people.mozilla.org/~lsblakk/trychooser/trychooser.html TryChooser Syntax Builder] website
or the [http://hg.mozilla.org/users/pbiggar_mozilla.com/trychooser/file/tip mercurial extension] (which also functions as a command-line application, but is not maintained by RelEng).
 
==Usage==
<pre>
try: OPTIONS
Options:
  -b --build TYPE
      Choose what type of builds you'd like made:
        --build d  gives debug builds only
        --build o  gives optimized builds only
        --build do  gives both debug and optimized builds
  -p --platform LIST
      Choose which platform(s) you'd like to build for with a
      comma-separated list:
        linux,linux64,macosx,macosx64,win32,maemo5-qt,android-r7,maemo5-gtk
      or specify 'none' or 'all'.
  -u --unittests LIST
      Choose which unittests you'd like run:
        crashtest,reftest,mochitests
      or give a subset of tests:
        mochitest-{1,2,3,4,5,o},xpcshell,opengl,jsreftest,mozmill-all
      or specify 'none' or 'all'.
  -t --talos LIST
      Choose which talos suites you'd like to run:
        tp,tscroll,tspider,etc.
      or specify 'none' or 'all'.
</pre>
<pre>
  Email notification control: (these are optional, default is to get emails on non-success)
 
  -e --all-emails (optional)
      Get notified by email of each builder in the try run's results
 
  -n --no-emails (optional)
      Get no email notifications of each builder's results
</pre>
<pre>
  Bugzilla commenting:
 
  --post-to-bugzilla Bug BUGNUMBER (optional)
      Get a comment in your specified BUGNUMBER at the end of the try run with a tally of the results and a tbpl link
</pre>
 
==Defaults==
 
If you don't specify an option or if you give an invalid value for an option, TryChooser will use its default for that option:
 
try: --build do
      --platform all
      --unittests all
      --talos none
 
==Examples==
; <tt>try: -b do -p all -u all -t all</tt>
: Run what mozilla-central's automation does: all platforms, all tests, all talos:
 
; <tt>try: -b do -u crashtest</tt>
: Debug and optimized builds, all available platforms, only crashtests, no talos:
 
; <tt>try: -b d -p linux -u none</tt>
: Linux debug build, no unittests, no talos:
 
; <tt>try: -b do -u all -t chrome,nochrome</tt>
: Debug and optimized builds for all platforms, all unittests, select talos:
 
; <tt>try: -b o -u jsreftest,crashtest,mochitest-1 -t tp4,scroll</tt>
: Opt builds on all available platforms, select unittests, select talos
 
; <tt>try: -b o -u all -n --post-to-bugzilla bug 456234</tt>
: Opt builds on all available platforms, all unittests, no emails, results posted to bug 456234
 
You may follow the <tt>try:</tt> section with other text, but be careful to separate the sections with whitespace.  That is, do
-t chrome,tp4 Some other stuff
instead of
-t chrome,tp4. Some other stuff
 
==Workflow==
 
===Without MQ===
 
If you're not using Mercurial Queues, you can use TryChooser by including a "try:" string in the message of the commit you push to try:
 
$ (edit your code)
$ hg commit -m "Bug XXXXXX - Change foo to bar.  try: -b d -p all"
$ hg push -f ssh://hg.mozilla.org/try
 
===With MQ===
 
If you're using Mercurial Queues, you can use TryChooser by adding an empty patch with a "try:" string to the top of your queue:
 
hg qgoto your-patch
hg qnew -m "try: <Insert options here>" try
hg push -f -rtip ssh://hg.mozilla.org/try
 
After pushing, you can remove the empty patch:
 
hg qpop
hg qremove try
 
==FAQ==
===What if I don't put "try:" in my commit message?===
If you don't give a "try:" string in your commit message, you'll get an error message on attempts to push to try as per {{bug|649402}} where try syntax use was made mandatory.
 
===What if make a syntax error in my commit message?===
If you pass an invalid parameter, TryChooser will ignore it and substitute the default in its place.  For instance, if you specify <tt>try: -b f -u crashtest</tt>, you'll get both debug and optimized builds, since "f" is not a recognized argument.  You'll only get crashtest run on those builds, however.
 
===Where's the full list of unit tests and talos tests I can request?===
 
Try should have the same test/talos suites available to it as mozilla-central does so you can refer to [http://tests.themasta.com/tinderboxpushlog/?tree=Firefox tbpl] for complete listings.
 
To match up the Talos suite name to the tests it runs you can go [http://hg.mozilla.org/build/buildbot-configs/file/701b6ccd8e55/mozilla-tests/config.py#l19 here]. (eg: 'chrome' runs ts:tdhtml:twinopen:tsspider)
 
If you need help building the syntax line you can also go to the [http://people.mozilla.org/~lsblakk/trychooser/trychooser.html TryChooser Syntax Builder] page.
 
===What do I do if I need to add or remove a job after I push?===
Check out [https://build.mozilla.org/buildapi/self-serve Self Serve!]. With Self-Serve you can cancel pending builds, re-build/run completed builds/test/talos runs.
 
===Where are my builds/test/talos?===
Sometimes TBPL is missing results (e.g. {{bug|590526}}), and sometimes it feels like it's been a while since you kicked the build off and you're getting antsy for results.  Here are some things you can look into before pinging the person on buildduty:
* Did the build compile successfully?  If it didn't, you won't get unittests or talos results.
**Look for your directory in [http://ftp.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/ the builds FTP server] and see what has been uploaded.  (You can also find here the email-changeset string that you'll need if you end up pinging releng.)
* Check [http://build.mozilla.org/builds/running.html Running] and [http://build.mozilla.org/builds/pending.html Pending] to view your build's status.  These pages lie less often than TBPL.
 
===Where are my macosx opt builds?===
Since [http://blog.mozilla.com/nthomas/2010/09/27/firefox-mac-universal-builds-have-changed/ mac universal builds changed] we now do the opt mac builds soley on macosx64 builders.  The unittests for both 10.5 and 10.6 are then run on that build.  This means, in order to get opt macosx reftest results you would need to do:
try: -b o -p macosx64 -u reftest
 
==Parsing details==
 
The parser for TryChooser is [http://hg.mozilla.org/build/buildbotcustom/file/tip/try_parser.py here].
 
The basic algorithm is:
* The commit message is split on 'try:'.
* Whatever follows after 'try:' is passed to try_parser as a string.
* The string is processed into a list of args handed to parse_known_args (thus keeping anything that is not a recognized argument from causing errors).
Confirmed users
3,104

edits