test/test_no_testers_without_builders.py
author ffxbld
Mon, 09 Jul 2018 12:29:38 -0700
changeset 15794 413c9b107dca53204535e17a6c869b93e4520ee3
parent 14825 d223fd5724cd09d31a2d4f66629b95953582b993
permissions -rw-r--r--
Update release config for Thunderbird-52.9.1-build3

'''
This script generates a list of buildbot test builders that do not
have a build to trigger it.
'''
import os

from mozci.platforms import determine_upstream_builder
from mozci.sources.allthethings import fetch_allthethings_data


def test_no_testers_without_builders():
    # We need to assert that allthethings.json has been generated
    # before running this test rather than fetching the one from the server
    # This is important as we want to test against the latest list of builders
    assert os.path.exists("allthethings.json")

    orphan_builders = []

    j = fetch_allthethings_data(verify=False)
    builders = j["builders"].keys()
    assert builders is not None, "The list of builders cannot be empty."

    for builder in sorted(builders):
        # Bug 1330680 - patches to disable bb nightlies on linux32/linux64/android
        # there are talos jobs that don't have associated build jobs as part
        # of tc migration
        if 'talos' in builder and 'Ubuntu HW' in builder:
            return

        if determine_upstream_builder(builder) is None:
            orphan_builders.append(builder)

    assert len(orphan_builders) == 0, \
        "There are downstream builders without upstream builders to trigger them."