示例#1
0
def raptor(is_staging):
    build_tasks = {}
    signing_tasks = {}
    other_tasks = {}

    geckoview_nightly_version = get_geckoview_versions()['nightly']
    mozharness_task_id = fetch_mozharness_task_id(geckoview_nightly_version)
    gecko_revision = taskcluster.Queue().task(
        mozharness_task_id)['payload']['env']['GECKO_HEAD_REV']

    for variant in [
            Variant.from_values(abi, False, 'forPerformanceTest')
            for abi in ('aarch64', 'arm')
    ]:
        assemble_task_id = taskcluster.slugId()
        build_tasks[assemble_task_id] = BUILDER.craft_assemble_raptor_task(
            variant)
        signing_task_id = taskcluster.slugId()
        signing_tasks[signing_task_id] = BUILDER.craft_raptor_signing_task(
            assemble_task_id, variant, is_staging)

        all_raptor_craft_functions = [
            BUILDER.craft_raptor_tp6m_cold_task(for_suite=i)
            for i in range(1, 15)
        ]
        for craft_function in all_raptor_craft_functions:
            args = (signing_task_id, mozharness_task_id, variant,
                    gecko_revision)
            other_tasks[taskcluster.slugId()] = craft_function(*args)

    return (build_tasks, signing_tasks, other_tasks)
def raptor(is_staging):
    build_tasks = {}
    signing_tasks = {}
    other_tasks = {}

    geckoview_nightly_version = get_geckoview_versions()
    mozharness_task_id = gecko_revision_for_version(geckoview_nightly_version)
    gecko_revision = taskcluster.Queue().task(mozharness_task_id)['payload']['env']['GECKO_HEAD_REV']

    for variant in [Variant.from_values(abi, False, 'raptor') for abi in ('arm', 'aarch64')]:
        assemble_task_id = taskcluster.slugId()
        build_tasks[assemble_task_id] = BUILDER.craft_assemble_task(variant)
        signing_task_id = taskcluster.slugId()
        signing_tasks[signing_task_id] = BUILDER.craft_raptor_signing_task(
            assemble_task_id, variant, is_staging)

        all_raptor_craft_functions = [
            BUILDER.craft_raptor_tp6m_task(for_suite=i)
            for i in range(1, 11)
        ] + [
            BUILDER.craft_raptor_speedometer_task,
            BUILDER.craft_raptor_speedometer_power_task,
        ]

        for craft_function in all_raptor_craft_functions:
            args = (signing_task_id, mozharness_task_id, variant, gecko_revision)
            other_tasks[taskcluster.slugId()] = craft_function(*args)
            # we also want the arm APK to be tested on 64-bit-devices
            if variant.abi == 'arm':
                other_tasks[taskcluster.slugId()] = craft_function(*args, force_run_on_64_bit_device=True)

    return (build_tasks, signing_tasks, other_tasks)
def get_variant(build_type):
    print("Fetching variant from gradle")
    output = _run_gradle_process('printVariant', variantBuildType=build_type)
    content = _extract_content_from_command_output(output, prefix='variant: ')
    variant = json.loads(content)

    print("Got variant: {}".format(variant))
    apks = [VariantApk(apk['abi'], apk['fileName']) for apk in variant['apks']]
    return Variant(variant['name'], build_type, apks)
示例#4
0
文件: gradle.py 项目: yadongliu/fenix
def get_variant(build_type, engine):
    print(
        "Fetching variant information for build_type='{}', engine='{}'".format(
            build_type, engine))
    output = _run_gradle_process('printVariant',
                                 variantBuildType=build_type,
                                 variantEngine=engine)
    content = _extract_content_from_command_output(output, prefix='variant: ')
    raw_variant = json.loads(content)
    return Variant(raw_variant['name'], build_type, [
        VariantApk(build_type, raw_apk['abi'], engine, raw_apk['fileName'])
        for raw_apk in raw_variant['apks']
    ])
示例#5
0
def get_variants_for_build_type(build_type):
    print("Fetching build variants from gradle")
    output = _run_gradle_process('printBuildVariants')
    content = _extract_content_from_command_output(output, prefix='variants: ')
    variants = json.loads(content)

    if len(variants) == 0:
        raise ValueError("Could not get build variants from gradle")

    print("Got variants: {}".format(variants))
    return [
        Variant(variant_dict['name'], variant_dict['abi'],
                variant_dict['isSigned'], variant_dict['buildType'])
        for variant_dict in variants if variant_dict['buildType'] == build_type
    ]