Ejemplo n.º 1
0
def test_example_report_status3(example_hydra_results):
    bldcfgs, reps = example_hydra_results
    # Check for all entries that should be present
    for C in CS:
        for G in GS:
            S = 'HEADs'
            B = 'PR-blah'  # PR1-PR11-PR111-PR1111-blah
            r = StatusReport(
                status=(2 if C == 'clang' else 'initial_success'),
                project='Project #1',
                strategy=S,
                branchtype="pullreq" if B.startswith('PR') else "regular",
                branch=B.split('-')[-1] if B.startswith('PR') else B,
                buildname='-'.join(['.'.join([B, S]), C, G]),
                bldvars=[
                    BldVariable(project='Project #1',
                                varname='ghcver',
                                varvalue=G),
                    BldVariable(project='Project #1',
                                varname='c_compiler',
                                varvalue=C),
                ],
                blddesc=PR_Grouped(B[3:]) if B.startswith('PR-') else
                (MainBranch('R1', B) if B == 'master' else BranchReq(
                    'Project #1', B)),
            )
            assert r in reps
Ejemplo n.º 2
0
def test_single_internal_master(generated_bldconfigs):
    expected = BldConfig(
        "TheRepo", "regular", "master", "standard",
        MainBranch("TheRepo", "master"), [
            BldRepoRev("TheRepo", "master", "project_primary"),
        ], [])
    assert expected in generated_bldconfigs.cfg_build_configs
Ejemplo n.º 3
0
def test_example_internal_master_regular_HEADs(generated_bldconfigs):
    for each in [
            BldConfig(projectname="R10",
                      branchtype="regular",
                      branchname="master",
                      strategy="HEADs",
                      description=MainBranch("R10", "master"),
                      blds=[
                          BldRepoRev("R10", "master", "project_primary"),
                          BldRepoRev("R3", "master", "project_primary"),
                          BldRepoRev("R4", "master", "project_primary"),
                      ],
                      bldvars=[BldVariable("R10", "ghcver", G)]) for G in GS
    ]:
        assert each in generated_bldconfigs.cfg_build_configs
Ejemplo n.º 4
0
def test_example_internal_develop_regular_submodules(generated_bldconfigs):
    for each in [
            BldConfig(projectname="R10",
                      branchtype="regular",
                      branchname="develop",
                      strategy="submodules",
                      description=MainBranch("R10", "develop"),
                      blds=[
                          BldRepoRev("R10", "develop", "project_primary"),
                          BldRepoRev("R3", "r3_master_head^9",
                                     "project_primary"),
                          BldRepoRev("R4", "r4_master_head^1",
                                     "project_primary"),
                      ],
                      bldvars=[BldVariable("R10", "ghcver", G)]) for G in GS
    ]:
        assert each in generated_bldconfigs.cfg_build_configs