def testFailuresNotifierCreation(self):
     notifier = failures_notifier.FailuresNotifier(
         fromaddr='buildbot@test',
         forgiving_steps=[],
         lookup='test',
         sendToInterestedUsers=False,
         extraRecipients=['extra@test'],
         status_header='Failure on test.')
     self.assertTrue(notifier)
Пример #2
0
def Update(config, active_master, c):
    c['status'].append(
        failures_notifier.FailuresNotifier(
            fromaddr=active_master.from_address,
            categories_steps=categories_steps,
            exclusions=exclusions,
            relayhost=config.Master.smtp,
            subject='buildbot %(result)s in %(projectName)s on %(builder)s, '
            'revision %(revision)s',
            extraRecipients=active_master.tree_closing_notification_recipients,
            lookup=master_utils.FilterDomain(),
            forgiving_steps=forgiving_steps,
            use_getname=True,
            public_html='../master.chromium/public_html',
            sheriffs=['sheriff_memory'],
            status_header=
            'Failure notification for "%(steps)s" on "%(builder)s".\n'
            'Please see if the failures are related to your commit and take '
            'appropriate actions (e.g. revert, update suppressions, notify '
            'sheriff, etc.).\n\n'
            'For more info on the memory waterfall please see these links:\n'
            'http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff\n'
            'http://dev.chromium.org/developers/how-tos/using-valgrind\n'
            'http://dev.chromium.org/developers/how-tos/using-valgrind/threadsanitizer\n'
            '\nBy the way, the current memory sheriff is on the CC list.'))

    # Set up a separate notifier for the Dr.Memory bots.
    # TODO(timurrrr); merge this with the main notifier once DrMemory is verified
    # to send few e-mails.
    drm_categories_steps = {
        'drmemory_tester': [
            # Please keep this list sorted.
            'memory test: base_unittests',
            'memory test: components',
            'memory test: content',
            'memory test: crypto',
            'memory test: ipc_tests',
            'memory test: media',
            'memory test: net',
            'memory test: printing',
            'memory test: remoting',
            'memory test: sql',
            'memory test: sync',
            'memory test: sync_unit_tests',
            'memory test: ui_unittests',
            'memory test: unit',  # unit_tests might be sharded
            'memory test: unit_1',
            'memory test: unit_2',
            'memory test: url',
        ],
    }
    c['status'].append(
        failures_notifier.FailuresNotifier(
            fromaddr=active_master.from_address,
            categories_steps=drm_categories_steps,
            exclusions=exclusions,
            relayhost=config.Master.smtp,
            subject='drmemory buildbot %(result)s in %(projectName)s on '
            '%(builder)s, revision %(revision)s',
            sendToInterestedUsers=True,
            extraRecipients=(
                active_master.tree_closing_notification_recipients +
                # Also send e-mails to the Dr.Memory team.
                [
                    '*****@*****.**',
                    '*****@*****.**',
                    '*****@*****.**',
                ]),
            lookup=master_utils.FilterDomain(),
            forgiving_steps=forgiving_steps,
            use_getname=True,
            public_html='../master.chromium/public_html',
            sheriffs=['sheriff_memory'],
            status_header=
            'Failure notification for "%(steps)s" on "%(builder)s".\n\n'
            'NOTE: This bot is in testing mode, but most of the failures are '
            'expected to indicate real bugs.\n\n'
            'Please see if the failures are related to your commit and take '
            'appropriate actions (e.g. revert, update suppressions, notify '
            'sheriff, etc.).\n\n'
            'For more info on Dr.Memory waterfall please see these links:\n'
            'http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff\n'
            'http://dev.chromium.org/developers/how-tos/using-drmemory\n'
            '\nBy the way, the current memory sheriff is on the CC list.'))