Bug 483111, Get stacks for try server unittest crashes, r=bhearsum
authorNick Thomas <nthomas@mozilla.com>
Tue, 27 Oct 2009 11:50:43 +1300
changeset 1663 5eb1dc43cd59ae9628fd32846eaa38a3ae7f4743
parent 1662 83a8d184044883efb6d3c81f92b37810c84859a5
child 1664 942bfd2f5eb869631f6e67b4b18b619bcd91bf0e
push id1204
push usernthomas@mozilla.com
push dateMon, 26 Oct 2009 22:50:55 +0000
reviewersbhearsum
bugs483111
Bug 483111, Get stacks for try server unittest crashes, r=bhearsum
tryserver/config.py
tryserver/factories.py
--- a/tryserver/config.py
+++ b/tryserver/config.py
@@ -15,8 +15,9 @@ WIN32_ENVIRONMENT = {
     'SYMBOL_SERVER_USER': 'trybld',
     'SYMBOL_SERVER_PATH': '/symbols/windows',
     'SYMBOL_SERVER_SSH_KEY': '$ENV{HOME}/.ssh/id_dsa',
     'NO_FAIL_ON_TEST_ERRORS': '1',
     # Source server support, bug 506702
     'PDBSTR_PATH': '/c/Program Files/Debugging Tools for Windows/srcsrv/pdbstr.exe'
 }
 SBOX_HOME = '/scratchbox/users/cltbld/home/cltbld'
+BUILD_TOOLS_REPO = 'http://hg.mozilla.org/build/tools/'
\ No newline at end of file
--- a/tryserver/factories.py
+++ b/tryserver/factories.py
@@ -1,10 +1,10 @@
 from buildbot.process import factory
-from buildbot.steps.shell import ShellCommand, WithProperties
+from buildbot.steps.shell import ShellCommand, WithProperties, SetProperty
 
 import buildbotcustom.env
 import buildbotcustom.steps.misc
 import buildbotcustom.steps.tryserver
 import buildbotcustom.steps.unittest as unittest
 reload(buildbotcustom.env)
 reload(buildbotcustom.steps.misc)
 reload(buildbotcustom.steps.tryserver)
@@ -368,16 +368,26 @@ for master,warn in TALOS_TRY_MASTERS:
 firefox_hg_linux_unittest_factory = factory.BuildFactory([
     s(MozillaTryProcessing),
     s(ShellCommand, name="remove source and obj dirs",
                     command=["rm", "-rf", "mozilla/"],
                     haltOnFailure=True,
                     flunkOnFailure=True,
                     workdir="."),
 
+    s(ShellCommand, name='rm buildtools',
+                    command=['rm', '-rf', 'tools'],
+                    description=['clobber', 'build tools'],
+                    workdir='.'),
+
+    s(ShellCommand, name='clone buildtools',
+                    command=['hg', 'clone', BUILD_TOOLS_REPO],
+                    description=['clone', 'build tools'],
+                    workdir='.'),
+
     s(ShellCommand, name="dump env vars",
                     workdir=".",
                     command="env | sort"),
 
     s(MozillaTryServerHgClone, workdir="mozilla"),
 
     s(MozillaDownloadMozconfig, mastersrc="mozconfig-linux-unittest",
                                 patchDir="patches/"),
@@ -401,60 +411,91 @@ firefox_hg_linux_unittest_factory = fact
                     description=["building"],
                     descriptionDone=["compile"],
                     command=["make", "-f", "client.mk", "build"],
                     haltOnFailure=True,
                     flunkOnFailure=True,
                     timeout=3600,
                     workdir="mozilla"),
 
-    s(unittest.MozillaCheck,
+    s(ShellCommand, name="make buildsymbols",
+                    command=["make", "buildsymbols"],
+                    haltOnFailure=True,
+                    workdir="mozilla/%s" % OBJDIR,
+    ),
+
+    s(SetProperty, name="get toolsdir",
+                   command=['bash', '-c', 'pwd'],
+                   property='toolsdir',
+                   workdir='tools',
+    ),
+
+])
+
+linuxUnittestEnv = MozillaEnvironments['linux-unittest'].copy()
+linuxUnittestEnv['MINIDUMP_STACKWALK'] = \
+    WithProperties('%(toolsdir:-)s/breakpad/linux/minidump_stackwalk')
+
+firefox_hg_linux_unittest_factory.addStep(
+    unittest.MozillaCheck,
       test_name="check",
       warnOnWarnings=True,
       workdir="mozilla/%s" % OBJDIR,
+      env=linuxUnittestEnv,
       timeout=5*60, # 5 minutes.
     ),
 
-    s(unittest.MozillaCheck,
+firefox_hg_linux_unittest_factory.addStep(
+    unittest.MozillaCheck,
       test_name="xpcshell-tests",
       warnOnWarnings=True,
       workdir="mozilla/%s" % OBJDIR,
+      env=linuxUnittestEnv,
       timeout=5*60, # 5 minutes.
     ),
-])
 
 for test_name in ('reftest', 'crashtest'): 
     firefox_hg_linux_unittest_factory.addStep(
         unittest.MozillaReftest, 
              test_name=test_name, 
              warnOnWarnings=True,
-             workdir="mozilla/objdir",
-             env=MozillaEnvironments['linux-unittest'],
+             workdir="mozilla/%s" % OBJDIR,
+             env=linuxUnittestEnv,
              timeout=60*5
     )
 
 for test_name in ('mochitest-plain', 'mochitest-chrome', 'mochitest-browser-chrome', 'mochitest-a11y'): 
     firefox_hg_linux_unittest_factory.addStep(
         unittest.MozillaMochitest,
                 test_name=test_name,
                 warnOnWarnings=True,
-                env=MozillaEnvironments['linux-unittest'],
-                workdir="mozilla/objdir",
+                env=linuxUnittestEnv,
+                workdir="mozilla/%s" % OBJDIR,
                 timeout=60*5
     )
 
 
 firefox_hg_macosx_unittest_factory = factory.BuildFactory([
     s(MozillaTryProcessing),
     s(ShellCommand, name="remove source and obj dirs",
                     command=["rm", "-rf", "mozilla/"],
                     haltOnFailure=True,
                     flunkOnFailure=True,
                     workdir="."),
 
+    s(ShellCommand, name='rm buildtools',
+                    command=['rm', '-rf', 'tools'],
+                    description=['clobber', 'build tools'],
+                    workdir='.'),
+
+    s(ShellCommand, name='clone buildtools',
+                    command=['hg', 'clone', BUILD_TOOLS_REPO],
+                    description=['clone', 'build tools'],
+                    workdir='.'),
+
     s(ShellCommand, name="dump env vars",
                     workdir=".",
                     command="env | sort"),
 
     s(MozillaTryServerHgClone, workdir="mozilla/"),
 
     s(MozillaDownloadMozconfig, mastersrc="mozconfig-macosx-unittest",
                                 patchDir="patches/"),
@@ -478,49 +519,70 @@ firefox_hg_macosx_unittest_factory = fac
                     description=["building"],
                     descriptionDone=["compile"],
                     command=["make", "-f", "client.mk", "build"],
                     haltOnFailure=True,
                     flunkOnFailure=True,
                     timeout=3600,
                     workdir="mozilla"),
 
-    s(unittest.MozillaCheck,
+    s(ShellCommand, name="make buildsymbols",
+                    command=["make", "buildsymbols"],
+                    haltOnFailure=True,
+                    workdir="mozilla/%s" % OBJDIR,
+    ),
+
+    s(SetProperty, name="get toolsdir",
+                   command=['bash', '-c', 'pwd'],
+                   property='toolsdir',
+                   workdir='tools',
+    ),
+
+])
+
+macosxUnittestEnv = MozillaEnvironments['macosx-unittest'].copy()
+macosxUnittestEnv['MINIDUMP_STACKWALK'] = \
+    WithProperties('%(toolsdir:-)s/breakpad/osx/minidump_stackwalk')
+
+firefox_hg_macosx_unittest_factory.addStep(
+    unittest.MozillaCheck,
       test_name="check",
       warnOnWarnings=True,
       workdir="mozilla/%s" % OBJDIR,
+      env=macosxUnittestEnv,
       timeout=5*60, # 5 minutes.
     ),
 
-    s(unittest.MozillaCheck,
+firefox_hg_macosx_unittest_factory.addStep(
+    unittest.MozillaCheck,
       test_name="xpcshell-tests",
       warnOnWarnings=True,
       workdir="mozilla/%s" % OBJDIR,
+      env=macosxUnittestEnv,
       timeout=5*60, # 5 minutes.
     ),
-])
-                              
+
 for test_name in ('reftest', 'crashtest'): 
     firefox_hg_macosx_unittest_factory.addStep(
         unittest.MozillaReftest, 
            test_name=test_name, 
            warnOnWarnings=True,
-           workdir="mozilla/objdir",
+           workdir="mozilla/%s" % OBJDIR,
+           env=macosxUnittestEnv,
            timeout=60*5,
-           env=MozillaEnvironments['macosx-unittest'],
     )
 
 for test_name in ('mochitest-plain', 'mochitest-chrome', 'mochitest-browser-chrome'): 
     firefox_hg_macosx_unittest_factory.addStep(
         unittest.MozillaMochitest,
             test_name=test_name,
             warnOnWarnings=True,
-            workdir="mozilla/objdir",
+            workdir="mozilla/%s" % OBJDIR,
+            env=macosxUnittestEnv,
             timeout=60*5,
-            env=MozillaEnvironments['macosx-unittest'],
     )
 
 firefox_hg_win32_unittest_factory = factory.BuildFactory([
     s(MozillaTryProcessing),
     s(TinderboxShellCommand, name="kill sh",
             description='kill sh',
             descriptionDone="killed sh",
             haltOnFailure=False,
@@ -554,16 +616,26 @@ firefox_hg_win32_unittest_factory = fact
     s(ShellCommand, name="remove source and obj dirs",
                     command=["rmdir", "/s", "/q", "mozilla"],
                     haltOnFailure=True,
                     flunkOnFailure=True,
                     workdir=".",
                     timeout=60*60, # 1 hour
                     env=MozillaEnvironments['win32-unittest']),
 
+    s(ShellCommand, name='rm buildtools',
+                    command=['rm', '-rf', 'tools'],
+                    description=['clobber', 'build tools'],
+                    workdir='.'),
+
+    s(ShellCommand, name='clone buildtools',
+                    command=['hg', 'clone', BUILD_TOOLS_REPO],
+                    description=['clone', 'build tools'],
+                    workdir='.'),
+
     s(ShellCommand, name="dump env vars",
                     workdir=".",
                     command="set | sort",
                     env=MozillaEnvironments['win32-unittest']),
 
     s(MozillaTryServerHgClone, workdir="mozilla/"),
 
     s(MozillaDownloadMozconfig, mastersrc="mozconfig-win32-unittest",
@@ -590,54 +662,73 @@ firefox_hg_win32_unittest_factory = fact
                     descriptionDone=["compile"],
                     command=["make", "-f", "client.mk", "build"],
                     haltOnFailure=True,
                     flunkOnFailure=True,
                     workdir="mozilla",
                     timeout=3600,
                     env=MozillaEnvironments['win32-unittest']),
 
-    s(unittest.MozillaCheck,
+    s(ShellCommand, name="make buildsymbols",
+                    command=["make", "buildsymbols"],
+                    haltOnFailure=True,
+                    workdir="mozilla/%s" % OBJDIR,
+    ),
+
+    s(SetProperty, name="get toolsdir",
+                   command=['bash', '-c', 'pwd'],
+                   property='toolsdir',
+                   workdir='tools',
+    ),
+
+])
+
+win32UnittestEnv = MozillaEnvironments['win32-unittest'].copy()
+win32UnittestEnv['MINIDUMP_STACKWALK'] = \
+    WithProperties('%(toolsdir:-)s/breakpad/win32/minidump_stackwalk.exe')
+
+firefox_hg_win32_unittest_factory.addStep(
+    unittest.MozillaCheck,
       test_name="check",
       warnOnWarnings=True,
       workdir="mozilla/%s" % OBJDIR,
-      env=MozillaEnvironments['win32-unittest'],
+      env=win32UnittestEnv,
       timeout=5*60, # 5 minutes.
     ),
 
-    s(unittest.MozillaCheck,
+firefox_hg_win32_unittest_factory.addStep(
+    unittest.MozillaCheck,
       test_name="xpcshell-tests",
       warnOnWarnings=True,
       workdir="mozilla/%s" % OBJDIR,
-      env=MozillaEnvironments['win32-unittest'],
+      env=win32UnittestEnv,
       timeout=5*60, # 5 minutes.
     ),
-])
 
 for test_name in ('reftest', 'crashtest'): 
     leakThreshold = None
     if test_name is 'crashtest':
         # Until bug 471647 is fixed
         leakThreshold = 484
     firefox_hg_win32_unittest_factory.addStep(
         unittest.MozillaReftest, 
             test_name=test_name, 
             leakThreshold=leakThreshold,
             warnOnWarnings=True,
-            workdir="mozilla/objdir",
-            env=MozillaEnvironments['win32-unittest'],
+            workdir="mozilla/%s" % OBJDIR,
+            env=win32UnittestEnv,
             timeout=60*5
     )
          
 for test_name in ('mochitest-plain', 'mochitest-chrome', 'mochitest-browser-chrome', 'mochitest-a11y'): 
     leakThreshold = None
     if test_name is 'mochitest-plain':
         # Until bug 471647 is fixed
         leakThreshold = 484
     firefox_hg_win32_unittest_factory.addStep(
         unittest.MozillaMochitest,
             test_name=test_name,
             leakThreshold=leakThreshold,
             warnOnWarnings=True,
-            env=MozillaEnvironments['win32-unittest'],
-            workdir="mozilla/objdir",
+            workdir="mozilla/%s" % OBJDIR,
+            env=win32UnittestEnv,
             timeout=60*5
     )