buildfarm/maintenance/test_purge_builds.py
author Nick Thomas <nthomas@mozilla.com>
Mon, 16 Jan 2017 10:55:39 +1300
changeset 7249 e1a40630a708fa529cd8765c40a768733b3b3439
parent 3406 47b77f5fcd442dad86fd1b069befddd936c540e8
permissions -rw-r--r--
Bug 1247169 - remove bundle and mirror support for hgtool.py, r=rail

from unittest import TestCase
from purge_builds import isImportant


class TestPurge(TestCase):

    importantDirsPattern = ['release-*', '*-nightly', 'info']
    importantDirs = ['mozilla-central-linux64-nightly',
                     'mozilla-central-linux64-l10n-nightly',
                     'release-mozilla-1.9.2-linux64_build',
                     'release-mozilla-central-win32-opt-unittest-crashtest',
                     'release-mozilla-1.9.1-linux-opt-unittest-mochitests-3',
                     'release-mozilla-central-macosx64_repack_3',
                     'release-mozilla-central-android_update_verify',
                     'info',
                     ]
    notImportantDirs = ['mozilla-1.9.2-linux-l10n-dep',
                        'mozilla-central-win32-xulrunner',
                        'nanojit-macosx64',
                        'fuzzer-linux',
                        'mozilla-central-linux64-debug',
                        ]

    def testImportantDirs(self):
        for d in self.importantDirs:
            self.assertTrue(isImportant(d, self.importantDirsPattern))

    def testNotImportantDirs(self):
        for d in self.notImportantDirs:
            self.assertFalse(isImportant(d, self.importantDirsPattern))