Esempio n. 1
0
    def test_skips_cleanspecs(self, mock_files, *other_checks):
        mock_files.return_value = ['foo/CleanSpec.mk']
        for other_check in other_checks:
            other_check.return_value = False

        for message_type in ('newchange', 'newpatchset', 'comment'):
            self.assertTrue(presubmit.should_skip_build({
                'MessageType': message_type,
                'Change-Id': '',
                'PatchSet': '',
            }))
Esempio n. 2
0
    def test_skips_bionicbb(self, mock_files, *other_checks):
        mock_files.return_value = ['tools/bionicbb/common.sh']
        for other_check in other_checks:
            other_check.return_value = False

        for message_type in ('newchange', 'newpatchset', 'comment'):
            self.assertTrue(presubmit.should_skip_build({
                'MessageType': message_type,
                'Change-Id': '',
                'PatchSet': '',
            }))
Esempio n. 3
0
    def test_rejects_non_googlers(self, mock_commit, *other_checks):
        mock_commit.return_value = {
            'committer': {'email': '*****@*****.**'}
        }

        for other_check in other_checks:
            other_check.return_value = False

        for message_type in ('newchange', 'newpatchset', 'comment'):
            self.assertTrue(presubmit.should_skip_build({
                'MessageType': message_type,
                'Change-Id': '',
                'PatchSet': '',
            }))