Ejemplo n.º 1
0
def pre_sequence_definition():
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(
        __product_line__, __area__),
                                        jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(
        steps_catalyst.process_uut_discover,
        name='UUT DISCOVER',
        kwargs={
            'method':
            'scan',
            'required_items': [
                'MOTHERBOARD_ASSEMBLY_NUM', 'MOTHERBOARD_SERIAL_NUM',
                'QUACK_LABEL_SN', 'USB_ASSEMBLY_NUM', 'USB_SERIAL_NUM',
                'TAN_NUM', 'SYSTEM_SERIAL_NUM'
            ],
            'prepopulated_items': ['DEVIATION_NUM'],
            'optional_items': [
                'POE1_ASSEMBLY_NUM', 'POE1_SERIAL_NUM', 'POE2_ASSEMBLY_NUM',
                'POE2_SERIAL_NUM'
            ]
        }
    )  # NOTE: This could be replaced by 'method: 'db' and read a previous TST record for automation.
    seq.add_step(steps_catalyst.ud_print_uut_descriptor,
                 name='PRINT DESCRIPTOR')
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 2
0
def pre_sequence_definition():
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(
        __product_line__, __desc__),
                                        jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(steps_catalyst.ud_set_puid_keys,
                 name='SET PUID',
                 kwargs={
                     'keys': [
                         'MODEL_NUM', 'VERSION_ID', 'MOTHERBOARD_ASSEMBLY_NUM',
                         'MOTHERBOARD_REVISION_NUM', 'SERIAL_NUM', 'MODEL_NUM'
                     ]
                 })
    seq.add_step(steps_catalyst.process_uut_discover,
                 name='UUT DISCOVER',
                 kwargs={
                     'method':
                     'scan',
                     'required_items': [
                         'MODEL_NUM', 'SERIAL_NUM', 'MOTHERBOARD_ASSEMBLY_NUM',
                         'QUACK_LABEL_SN'
                     ],
                     'optional_items': [],
                 })
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 3
0
def pre_sequence_definition():
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(
        __product_line__, __area__),
                                        jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(steps_catalyst.ud_set_puid_keys,
                 name='SET PUID',
                 kwargs={'keys': PUID_KEYS})
    seq.add_step(steps_catalyst.process_uut_discover,
                 name='UUT DISCOVER',
                 kwargs={
                     'method':
                     'scan',
                     'required_items': ['TAN_NUM', 'SYSTEM_SERIAL_NUM'],
                     'prepopulated_items': ['DEVIATION_NUM'],
                     'optional_items': [
                         'USB_ASSEMBLY_NUM', 'USB_SERIAL_NUM',
                         'STKPWR_ASSEMBLY_NUM', 'STKPWR_SERIAL_NUM'
                     ]
                 })

    seq.add_step(steps_catalyst.ud_print_uut_descriptor,
                 name='PRINT DESCRIPTOR')
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 4
0
def pre_sequence_definition():
    """ Supercontainer
    :return:
    """
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(
        __product_line__, __area__),
                                        jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})

    steps_ess_chamber.set_chamber_slots(
        max_chamber_slots=DEFAULT_MAX_CHAMBER_SLOTS)
    seq.add_step(steps_ess_chamber.prestep__chamber_staging,
                 name='CHAMBER STAGING',
                 kwargs={'area': 'PCB2C'})

    # Chamber PRE-SEQ Readiness
    seq.add_step(steps_ess_chamber.step__chamber_init,
                 name='CHAMBER INIT',
                 kwargs={
                     'first_init': True,
                     'profile_type': 'commercial',
                     'fi_action': 'nopause'
                 })
    seq.add_step(steps_ess_chamber.step__chamber_start, name='CHAMBER START')

    # UUT PRE-SEQ Queue
    seq.add_step(step__queue_children, name='QUEUE UUT PRESEQ')

    # Chamber Post-Staging
    seq.add_step(steps_ess_chamber.prestep__chamber_post_staging,
                 name='CHAMBER POST STAGING')

    seq.add_step(steps_catalyst.final, name='FINAL', finalization=True)

    return seq
Ejemplo n.º 5
0
def main_control_sequence_definition():
    """EdisonCSR ASSY Pre-sequence

    :return:
    """
    seq = lib.get_sequence_definition('FST AUTOMATION SEQ')
    seq.add_step(step__auto_monitor, name='AUTOMATION MONITOR')
    return seq
def pre_sequence_definition():
    seq = lib.get_sequence_definition('PRE SEQ')
    seq.add_step(labels_scan, name='SCAN CONTAINER')
    seq.add_step(module_load, name='LOAD_MODULES')
    seq.add_step(version_control, name='VERSION_CONTROL')
    seq.add_step(init_instrument, name='INIT_INSTRUMENT')
    seq.add_step(pre_finalize, name='PRE_FINALIZE', group_level=lib.FINALIZATION)
    return seq
Ejemplo n.º 7
0
def pre_sequence_definition():
    seq = aplib.get_sequence_definition('{0} PRESEQ DEBUG'.format(__product_line__), jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(steps_catalyst.process_manual_select_family, name='SELECT FAMILY', kwargs={'area_seq_module': thismodule})
    seq.add_step(steps_catalyst.process_uut_debug_scan, name='DEBUG SETUP', kwargs={'product_line': __product_line__})
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 8
0
def standard_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, __area__),
                                        jump_on_error='FINAL')

    # ------------------------------------------------------------------------------------------------------------------
    # Init
    init_seq = seq.add_sequence('INITIALIZATION')
    init_seq.add_step(steps_quake.init, name='INIT', kwargs={})
    init_seq.add_step(steps_quake.ud_retrieve, name="RETRIEVE UUT DESCRIPTOR")
    init_seq.add_step(steps_quake.ud_print_uut_descriptor,
                      name='PRINT DESCRIPTOR')
    init_seq.add_step(steps_quake.ud_print_uut_config, name='PRINT UUT CONFIG')

    # Power ON & Boot
    # Unit should already be powered up from pre-sequence auto-discovery.
    seq.add_step(steps_quake.power_cycle_on,
                 name='POWER ON BOOT',
                 group_level=5,
                 enabled=False)

    # Basic Mode
    seq.add_step(steps_quake.goto_mode,
                 name='MODE IOS',
                 kwargs={'mode': 'IOS'})

    # PIDVID Verify
    seq.add_step(steps_quake.process_verify_pidvid,
                 name='PIDVID VERIFY',
                 jump_on_error='CLEAN UP')

    # ------------------------------------------------------------------------------------------------------------------
    #
    # PUT CODE HERE
    #

    # ------------------------------------------------------------------------------------------------------------------
    # Clean up
    final_seq = seq.add_sequence('FINAL', finalization=True)
    final_seq.add_step(steps_quake.power_off,
                       name='POWER OFF',
                       kwargs={},
                       group_level=1000)
    final_seq.add_step(steps_quake.clean_up, name='CLEAN UP')
    final_seq.add_step(steps_quake.final, name='END')

    return seq
Ejemplo n.º 9
0
def pre_sequence_definition():
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(__product_line__, __desc__), jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(steps_catalyst.process_uut_discover, name='UUT DISCOVER',
                 kwargs={'method': 'boot'})
    seq.add_step(steps_catalyst.ud_print_uut_descriptor, name='PRINT DESCRIPTOR')
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 10
0
def eng_utility_menu_sequence_definition():
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(aplib.get_my_container_key()))
    pf = udd.get('product_family').upper()
    seq = aplib.get_sequence_definition('{0} {1} SEQ ENG MENU DEBUG'.format(__product_line__, pf), jump_on_error='FINAL')
    if pf in SEQ_STEP_MAP:
        func = getattr(thismodule, SEQ_STEP_MAP[pf].seq_function_name)
        return func(seq, pf, udd)
    else:
        seq.add_step(err_product_family, kwargs={'pf': pf})
        seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 11
0
def pre_control_sequence_definition():
    """EdisonCSR auto test scan-sequence

    :return:
    """
    seq = lib.get_sequence_definition('FST AUTOMATION PRE SEQ')
    seq.add_step(prestep__set_test_mode,
                 name='SET TEST MODE',
                 group_level=lib.INITIALIZATION)
    seq.add_step(prestep__restore_container, name='Restore Running Container')
    seq.add_step(step__auto_monitor, name='AUTOMATION MONITOR')
    seq.add_step(prestep__clean_up,
                 name='SLOT STATUS CLEANUP',
                 group_level=lib.FINALIZATION)
    return seq
Ejemplo n.º 12
0
def pre2_sequence_definition():
    """ UUT Container
    :return:
    """
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(__product_line__, __area__), jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(steps_catalyst.ud_set_puid_keys, name='SET PUID', kwargs={'keys': PUID_KEYS})
    seq.add_step(steps_catalyst.process_uut_discover, name='UUT DISCOVER', kwargs={'method': 'boot'})
    seq.add_step(steps_ess_chamber.prestep__set_chamber_attributes, name='UUT CHAMBER ATTRIBUTES', kwargs={})
    seq.add_step(steps_catalyst.ud_print_uut_descriptor, name='PRINT DESCRIPTOR')
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 13
0
def standard_switch_sequence_definition():
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(
        aplib.get_my_container_key()))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, __desc__),
                                        jump_on_error='FINAL')
    if pf in SEQ_STEP_MAP:
        func = getattr(thismodule, SEQ_STEP_MAP[pf].seq_function_name)
        return func(seq, pf, udd)
    else:
        seq.add_step(step__unknown, kwargs={'pf': pf})
        seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 14
0
def standard_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(__product_line__, pf, pc, __desc__), jump_on_error='FINAL')
    # -------
    subseq__init(seq)
    #
    # PUT DF SEQ HERE !
    #
    subseq__final(seq)
    return seq
Ejemplo n.º 15
0
def pre_sequence_definition():
    """ Run pre-sequence that includes operator scanning, board info discovery,
        add tst start record and etc.

    :return: seq (object)
    """
    seq = lib.get_sequence_definition('PRE SEQ')
    seq.add_step(version_control)
    seq.add_step(pre_initialize, name='PRE_INITIALIZE')
    seq.add_step(labels_scan, name='label_scan')
    seq.add_step(get_test_area, name='GET_TEST_AREA')
    seq.add_step(tst_area_check, name='TST_AREA_CHECK')
    seq.add_step(add_tst_data, name='ADD_TST_DATA')
    seq.add_step(pre_finalize,
                 name='PRE_FINALIZE',
                 group_level=lib.FINALIZATION)

    return seq
Ejemplo n.º 16
0
def standard_modular_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, __desc__),
                                        jump_on_error='FINAL')
    if pf in SEQ_STEP_MAP:
        func = getattr(thismodule, SEQ_STEP_MAP[pf].seq_function_name)
        return func(seq, pf, udd, container)
    else:
        seq.add_step(err_product_family, kwargs={'pf': pf})
        seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
Ejemplo n.º 17
0
def prepare_sequence_definition():
    seq = aplib.get_sequence_definition('{0} {1} PRESEQ'.format(
        __product_line__, __desc__),
                                        jump_on_error='FINAL')
    seq.add_step(steps_catalyst.init_catalyst, name='INIT', kwargs={})
    seq.add_step(steps_catalyst.ud_set_puid_keys,
                 name='SET PUID',
                 kwargs={'keys': PUID_KEYS})
    seq.add_step(steps_catalyst.power_off, name='POWER OFF')
    seq.add_step(steps_catalyst.process_uut_discover,
                 name='UUT DISCOVER',
                 kwargs={'method': 'boot'})
    seq.add_step(steps_catalyst.ud_print_uut_descriptor,
                 name='PRINT DESCRIPTOR')
    seq.add_step(steps_catalyst.process_analyze_lineid, name='GET LINEID INFO')
    seq.add_step(steps_catalyst.process_update_cfg_model_num,
                 name='UPDATE CFG MODEL NUM')
    seq.add_step(steps_catalyst.process_add_tst, name='ADD TST')
    seq.add_step(steps_catalyst.ud_save, name='SAVE UUT DESCRIPTOR')
    seq.add_step(steps_catalyst.ud_cache_ud_data, name='CACHE UUT DATA')
    seq.add_step(steps_catalyst.final, name='FINAL')
    return seq
def main_sequence_definition():
    seq = lib.get_sequence_definition('MAIN_INT_PRODUCT_SEQ')
    seq.add_step(userdict_invoke, name='INITIATE_USER_DICT')
    seq.add_step(module_load, name='LOAD_MODULES_MAIN')
    seq.add_step(instrument_idn, name='INSTRUMENT_IDN')
    seq.add_step('MEASURE_CABLE_LOSS_PATH1', codepath=code_path, function='measure_cable_loss', kwargs={'path': 1},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH2', codepath=code_path, function='measure_cable_loss', kwargs={'path': 2},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH3', codepath=code_path, function='measure_cable_loss', kwargs={'path': 3},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH4', codepath=code_path, function='measure_cable_loss', kwargs={'path': 4},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH5', codepath=code_path, function='measure_cable_loss', kwargs={'path': 5},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH6', codepath=code_path, function='measure_cable_loss', kwargs={'path': 6},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH7', codepath=code_path, function='measure_cable_loss', kwargs={'path': 7},
                 loop_on_error=2)
    seq.add_step('MEASURE_CABLE_LOSS_PATH8', codepath=code_path, function='measure_cable_loss', kwargs={'path': 8},
                 loop_on_error=2)
    seq.add_step(save_path_loss, name='SAVE_PATH_LOSS')
    seq.add_step(main_finalize, name='MAIN_FINALIZE', group_level=lib.FINALIZATION)
    return seq
Ejemplo n.º 19
0
def standard_switch_common(profile_type):
    """ 2C/4C Run Sequence that includes:
        1) setup
        2) area check
        3) chamber startup
        4) corner buildup
        5) chamber wrapup
        5) power off
        6) cleanup

    :return: seq
    """
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, __area__),
                                        jump_on_error='FINAL')

    # Enable CATS
    # seq.adt_enabled = ['cats']
    # ------------------------------------------------------------------------------------------------------------------
    # Init
    init_seq = seq.add_sequence('INITIALIZATION')
    init_seq.add_step(steps_nyquist.init, name='INIT', kwargs={})
    init_seq.add_step(steps_nyquist.ud_retrieve,
                      name="RETRIEVE UUT DESCRIPTOR")
    init_seq.add_step(steps_nyquist.ud_print_uut_descriptor,
                      name='PRINT DESCRIPTOR')
    init_seq.add_step(steps_nyquist.ud_print_uut_config,
                      name='PRINT UUT CONFIG')

    # Chamber Init
    # TODO: Trac#6087
    seq.add_step(steps_ess_chamber.step__chamber_init,
                 name='CHAMBER INIT',
                 kwargs={
                     'profile_type': profile_type,
                     'fi_action': 'nopause',
                     'first_init': False
                 })
    # Area Check
    seq.add_step(steps_nyquist.process_area_check,
                 name='AREACHECK',
                 kwargs={'previous_area': 'ICT'},
                 enabled=True)

    # MAC Verify Only
    seq.add_step(steps_nyquist.process_assign_verify_mac,
                 name='VERIFY MAC',
                 kwargs={'assign': False})

    # ------------------------------------------------------------------------------------------------------------------
    # PCAMAP
    pcamap_seq = seq.add_sequence('PCAMAP PROGRAMMING', enabled=True)
    # Verify CMPD
    # TODO: waiting Trac #5852
    pcamap_seq.add_step(steps_nyquist.process_verify_cmpd,
                        name='VERIFY CMPD SPROM',
                        kwargs={
                            'force': False,
                            'cmpd_description': 'SPROM',
                            'uut_type_key': 'MODEL_NUM',
                            'part_number_key': 'MOTHERBOARD_ASSEMBLY_NUM',
                            'part_revision_key': 'MOTHERBOARD_REVISION_NUM',
                            'previous_area': 'PCBST',
                            'eco_type': 'VERIFICATION'
                        },
                        enabled=False)

    # Chamber Start
    seq.add_step(steps_ess_chamber.step__chamber_start,
                 name='CHAMBER START',
                 kwargs={})

    # --------------------------------------------------------------------------------------------------------------
    # Build All Corners
    # Example corners = OrderedDict([('NTNV', ('AMBIENT', 'NOMINAL', False)),
    #                                ('HTLV', ('HOT', 'LOW', True)),
    #                                ('LTLV', ('COLD', 'LOW', True))])
    if True:  # Logic branch for chamber debug (if needed)
        corners = steps_ess_chamber.get_global_corners()
        for i, corner in enumerate(corners):
            temperature = corners[corner][0]
            voltage = corners[corner][1]
            adt_flag = corners[corner][2]
            corner_seq = seq.add_sequence('{0} CORNER'.format(corner),
                                          adt_enabled=adt_flag)
            corner_seq.add_step(steps_ess_chamber.step__chamber_ramp,
                                name='CHAMBER RAMP {0}'.format(temperature),
                                kwargs={'action': temperature})
            corner_seq_sublevel1 = corner_seq.add_sequence('UUT-MONITOR GROUP',
                                                           parallel_steps=True)
            corner_seq_sublevel1.add_step(
                steps_ess_chamber.step__chamber_start_monitor,
                name="CHAMBER MONITOR START {0}".format(i))
            corner_seq_sublevel2 = corner_seq_sublevel1.add_sequence(
                'UUT AT {0} VOLT'.format(voltage))
            corner_seq_sublevel3 = corner_seq_sublevel2.add_sequence(
                'UUT TESTS',
                adt_enabled=adt_flag,
                jump_on_error="CHAMBER MONITOR STOP {0}".format(i))
            corner_seq_sublevel3.add_step(steps_nyquist.power_cycle_on,
                                          name='POWER ON BOOT',
                                          group_level=5)
            if True:  # Logic branch for chamber debug (if needed)
                corner_seq_sublevel3.add_step(steps_nyquist.goto_mode,
                                              name='MODE STARDUST',
                                              kwargs={'mode': 'STARDUST'})
                corner_seq_sublevel3.add_step(
                    steps_nyquist.diags_switch_mcu_mode,
                    name='MCU MODE IOS',
                    kwargs={'kkmode': 'IOS'})
                corner_seq_sublevel3.add_step(steps_nyquist.diags_sysinit,
                                              name='DIAG SYSINIT')
                corner_seq_sublevel3.add_step(steps_nyquist.diags_vmargin_test,
                                              name='VOLTAGE MARGIN',
                                              kwargs={
                                                  'device_instance': 0,
                                                  'margin_level': voltage
                                              })
                corner_seq_sublevel3.add_step(
                    steps_nyquist.diags_temperature_test,
                    name='UUT TEMPERATURES',
                    kwargs={
                        'temperature_corner': temperature,
                        'operational_state': 'idle'
                    })
                corner_seq_sublevel3.add_step(steps_nyquist.diags_psu_check,
                                              name='PSU CHECK',
                                              kwargs={})
                corner_seq_sublevel3.add_step(
                    steps_nyquist.diags_stackrac_test,
                    name='STACKRAC TEST',
                    kwargs={})
                corner_seq_sublevel3.add_step(
                    steps_nyquist.diags_serdeseye_sif_test,
                    name='SERDES EYE SIF TEST',
                    kwargs={})
                corner_seq_sublevel3.add_step(
                    steps_nyquist.diags_serdeseye_nif_test,
                    name='SERDES EYE NIF TEST',
                    kwargs={})
                # Diag Testlist build-out
                corner_seq_sublevel3_diag = corner_seq_sublevel3.add_sequence(
                    'DIAG TESTS')
                corner_seq_sublevel3_diag.add_step(steps_nyquist.goto_mode,
                                                   name='MODE DIAG',
                                                   kwargs={'mode': 'DIAG'})
                dynamic_sequence_builder.build_diag_testlist_subseq(
                    diag_seq=corner_seq_sublevel3_diag,
                    container=container,
                    udd=udd,
                    step_module=steps_nyquist,
                    category=None,
                    enabled=True)
                # Traffic Testlist build-out
                corner_seq_sublevel3_traf = corner_seq_sublevel3.add_sequence(
                    'TRAF TESTS')
                corner_seq_sublevel3_traf.add_step(steps_nyquist.goto_mode,
                                                   name='MODE STARDUST',
                                                   kwargs={'mode': 'STARDUST'})
                dynamic_sequence_builder.build_traffic_cases_subseq(
                    traffic_seq=corner_seq_sublevel3_traf,
                    container=container,
                    udd=udd,
                    step_module=steps_nyquist,
                    category=None,
                    enabled=True)
            # Corner wrap-up
            corner_seq_sublevel2.add_step(
                steps_ess_chamber.step__chamber_stop_monitor,
                name="CHAMBER MONITOR STOP {0}".format(i),
                kwargs={},
                group_level=aplib.FINALIZATION - 2)
            corner_seq.add_step(steps_nyquist.power_off,
                                name='POWER OFF',
                                group_level=aplib.FINALIZATION - 1)

    # ------------------------------------------------------------------------------------------------------------------
    # Chamber Wrap-Up
    #   1. Chamber Stop will sync all containers AND return chamber to ambient.
    #   2. Power off each UUT.
    #   3. Clean Up (remove classes and clean userdict)
    final_seq = seq.add_sequence('FINAL', finalization=True)
    final_seq.add_step(steps_ess_chamber.step__chamber_final,
                       name="CHAMBER STOP",
                       kwargs={},
                       group_level=aplib.FINALIZATION - 3)
    final_seq.add_step(steps_nyquist.power_off,
                       name='POWER OFF',
                       group_level=aplib.FINALIZATION - 2)
    final_seq.add_step(steps_nyquist.clean_up,
                       name='CLEAN UP',
                       group_level=aplib.FINALIZATION - 1)

    return seq
Ejemplo n.º 20
0
def standard_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, __desc__),
                                        jump_on_error='FINAL')
    # -------
    subseq__init(seq)

    # Area Check
    seq.add_step(steps_edison.process_area_check,
                 name='AREACHECK',
                 kwargs={'previous_area': 'SYSASSY'},
                 enabled=True,
                 jump_on_error='FINAL')

    seq.add_step(steps_edison.goto_mode,
                 name='MODE BTLDR INIT',
                 kwargs={'mode': 'BTLDR'})
    seq.add_step(steps_edison.pcamap_read_uut, name='READ UUT INFO')
    seq.add_step(steps_edison.process_verify_cmpd,
                 name='VERIFY CMPD',
                 kwargs={'eco_type': 'VERIFICATION'})
    seq.add_step(steps_edison.process_get_swpid_from_lineid,
                 name='GET IOS PID')
    seq.add_step(steps_edison.ios_get_software_licenses,
                 name='GET SW LICENSES')
    # seq.add_step(steps_edison.process_assign_verify_mac, name='VERIFY MAC')
    seq.add_step(steps_edison.process_populate_dsc_pcamap,
                 name='LOAD DSC PCAMAP',
                 kwargs={'source_testarea': ['SYSINT', 'SYSASSY']})
    seq.add_step(steps_edison.process_verify_clei_eci_label,
                 name='VERIFY CLEI LABEL',
                 kwargs={'source_testarea': ['SYSINT', 'SYSASSY']})
    seq.add_step(steps_edison.ios_download_images, name='PREPARE IOS IMAGES')

    # Bootloader mode
    seq.add_step(steps_edison.goto_mode,
                 name='MODE BTLDR',
                 kwargs={'mode': 'BTLDR'})
    seq.add_step(steps_edison.upgrade_btldr, name='UPGRADE BTLDR')
    # Program Top Level PID
    seq.add_step(steps_edison.pcamap_program_toplevel_pid,
                 name='PROGRAM TOP LEVEL PID')

    # Linux Mode
    seq.add_step(steps_edison.goto_mode,
                 name='MODE LINUX',
                 kwargs={
                     'mode': 'LINUX',
                     'do_primary_mount': True
                 })
    seq.add_step(steps_edison.linux_set_terminal_width,
                 name='SET TERMINAL WIDTH')
    seq.add_step(steps_edison.ios_remove_default_licenses,
                 name='DELETE DEFAULT LICENSES')
    seq.add_step(steps_edison.ios_install_supplemental_images,
                 name='INSTALL SUPP IMAGES')
    seq.add_step(steps_edison.load_hw_images,
                 name='DOWNLOAD DIAG IMAGE',
                 kwargs={'master_list': ['diag']})

    # Verify MCU -----------------
    mcu_vrfy_subseq = seq.add_sequence('VERIFY MCU')
    mcu_vrfy_subseq.add_step(steps_edison.goto_mode,
                             name='MODE STARDUST - VERIFY MCU',
                             kwargs={'mode': 'STARDUST'})
    mcu_vrfy_subseq.add_step(steps_edison.upgrade_mcu,
                             name='VERIFY MCU',
                             kwargs={'verify_only': True})

    # Get PSU data----------------
    seq.add_step(steps_edison.diags_psu_check, name='GET PSU INFO')
    # ----------------------------

    # Quack DSC ------------------
    quack_dsc_subseq = seq.add_sequence(
        'QUACK DATA STACK CABLE', precondition='userdict.get("dsc_installed")')
    quack_dsc_subseq.add_step(steps_edison.goto_mode,
                              name='MODE STARDUST - QUACK DSC',
                              kwargs={'mode': 'STARDUST'})
    quack_dsc_subseq.add_step(steps_edison.pcamap_write_uut_peripheral,
                              name='WRITE DSC PCAMAP DEV 2',
                              kwargs={'device_instance': '2'})
    quack_dsc_subseq.add_step(steps_edison.pcamap_write_uut_peripheral,
                              name='WRITE DSC PCAMAP DEV 3',
                              kwargs={'device_instance': '3'})
    quack_dsc_subseq.add_step(steps_edison.quack2_sign_chip,
                              name='QUACK DSC 2',
                              kwargs={'device_instance': '2'})
    quack_dsc_subseq.add_step(steps_edison.quack2_sign_chip,
                              name='QUACK DSC 3',
                              kwargs={'device_instance': '3'})
    quack_dsc_subseq.add_step(steps_edison.diags_stackrac_test,
                              name='STACK RAC TEST')
    # ----------------------------

    # Config check ---------------
    cnf_chk_subseq = seq.add_sequence('CONFIG CHECK')
    cnf_chk_subseq.add_step(steps_edison.pcamap_read_uut,
                            name='READ DEV 1',
                            kwargs={'device_instance': 1})
    cnf_chk_subseq.add_step(steps_edison.pcamap_read_uut,
                            name='READ DEV 2',
                            kwargs={'device_instance': 2})
    cnf_chk_subseq.add_step(steps_edison.pcamap_read_uut,
                            name='READ DEV 3',
                            kwargs={'device_instance': 3})
    cnf_chk_subseq.add_step(steps_edison.process_configuration_check,
                            name='CNF CHECK')
    # ----------------------------

    # Add tst data ---------------
    seq.add_step(steps_edison.process_add_tst_data_for_children,
                 name='ADD TST DATA FOR COMPONENTS')
    # ----------------------------

    # Stardust Diag Testing ------
    diag_subseq = seq.add_sequence('DIAGNOSTIC TESTS')
    diag_subseq.add_step(steps_edison.goto_mode,
                         name='MODE STARDUST - DIAGNOSTIC',
                         kwargs={'mode': 'STARDUST'})
    diag_subseq.add_step(steps_edison.diags_sysinit, name='SYSINIT')
    diag_subseq.add_step(steps_edison.diags_rtc_chkset_test,
                         name='RTC CHK SET',
                         kwargs=dict(severity_allowed=400))
    diag_subseq.add_step(steps_edison.diags_serdeseye_sif_test,
                         name='SERDES EYE SIF TEST',
                         precondition='userdict.get("dsc_installed")')
    diag_subseq.add_step(steps_edison.diags_serdeseye_nif_test,
                         name='SERDES EYE NIF TEST')
    diag_subseq.add_step(steps_edison.diags_vmargin_test,
                         name='VOLTAGE TEST',
                         kwargs={
                             'check_only': True,
                             'margin_level': 'NOMINAL',
                             'device_instance': 0
                         })
    diag_subseq.add_step(steps_edison.upgrade_fpga, name='UPGRADE FPGA')
    # ----------------------------

    # IOS install ----------------
    ios_install_subseq = seq.add_sequence('IOS INSTALLATION')
    ios_install_subseq.add_step(steps_edison.goto_mode,
                                name='MODE BTLDR - IOS INSTALL',
                                kwargs={'mode': 'BTLDR'})
    ios_install_subseq.add_step(steps_edison.ios_install_main_image,
                                name='INSTALL MAIN IOS IMAGE')
    # ----------------------------

    # License Install/Verify -----
    lic_subseq = seq.add_sequence('LIC INSTALL AND VERIFY')
    lic_subseq.add_step(steps_edison.goto_mode,
                        name='MODE IOSE - LIC',
                        kwargs={'mode': 'IOSE'})
    lic_subseq.add_step(steps_edison.ios_install_licenses, name='INSTALL LIC')
    lic_subseq.add_step(steps_edison.ios_verify_default_licenses,
                        name='VERIFY LIC')
    lic_subseq.add_step(steps_edison.ios_verify_apcount_license,
                        name='VERIFY APCOUNT LIC')
    # ----------------------------

    # Verify IOS status ----------
    ios_verify_subseq = seq.add_sequence('VERIFY IOS STATUS')
    ios_verify_subseq.add_step(steps_edison.goto_mode,
                               name='MODE IOSE - IOS VERIFY STATUS',
                               kwargs={'mode': 'IOSE'})
    ios_verify_subseq.add_step(steps_edison.process_get_hw_modules_from_lineid,
                               name='GET HW MODULES')
    ios_verify_subseq.add_step(steps_edison.ios_verify_idpro,
                               name='ID PRO VERIFY')
    ios_verify_subseq.add_step(steps_edison.ios_verify_log_for_empty_poe_ports,
                               name='VERIFY POE LOGS')
    ios_verify_subseq.add_step(steps_edison.ios_verify_customer_version,
                               name='VERIFY IOS VER')
    ios_verify_subseq.add_step(steps_edison.ios_check_environments,
                               name='IOS ENV')
    # ----------------------------

    # IOS clean up
    seq.add_step(steps_edison.ios_clean_up, name='IOS CLEAN UP')
    # ------------------------------------------------------------------------------------------------------------------

    # Power Cycle and wait for UUT to boot up IOS
    seq.add_step(steps_edison.goto_mode,
                 name='MODE BTLDR - FINAL',
                 kwargs={'mode': 'BTLDR'})
    seq.add_step(
        steps_edison.pcamap_cleanup_rommon_params,
        name='UNSET PARAMS',
    )
    seq.add_step(steps_edison.pcamap_set_manual_boot,
                 name='MANUAL BOOT NO',
                 kwargs={'manual_boot': False})
    seq.add_step(steps_edison.power_cycle_on,
                 name='POWER CYCLE',
                 kwargs={'wait_for_boot': False})
    seq.add_step(steps_edison.ios_waitfor_cfg_dialog_boot,
                 name='WAIT FOR IOS BOOT UP')
    seq.add_step(steps_edison.power_off, name='POWER OFF')

    subseq__final(seq)
    return seq
Ejemplo n.º 21
0
def standard_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, __area__),
                                        jump_on_error='FINAL')

    # Enable CATS
    # seq.adt_enabled = ['cats']
    # ------------------------------------------------------------------------------------------------------------------
    # Init
    init_seq = seq.add_sequence('INITIALIZATION')
    init_seq.add_step(steps_quake.init, name='INIT', kwargs={})
    init_seq.add_step(steps_quake.ud_retrieve, name="RETRIEVE UUT DESCRIPTOR")
    init_seq.add_step(steps_quake.ud_print_uut_descriptor,
                      name='PRINT DESCRIPTOR')
    init_seq.add_step(steps_quake.ud_print_uut_config, name='PRINT UUT CONFIG')

    # Area Check
    seq.add_step(steps_quake.process_area_check,
                 name='AREACHECK',
                 kwargs={},
                 enabled=True)

    # Power ON & Boot
    # Unit should already be powered up from pre-sequence auto-discovery.
    seq.add_step(steps_quake.power_cycle_on,
                 name='POWER ON BOOT',
                 group_level=5,
                 enabled=False)

    # Basic Mode
    seq.add_step(steps_quake.goto_mode,
                 name='MODE BTLDR',
                 kwargs={'mode': 'BTLDR'})

    # MAC Verify Only
    seq.add_step(steps_quake.process_assign_verify_mac,
                 name='VERIFY MAC',
                 kwargs={'assign': False})

    # Get RFID Data
    seq.add_step(steps_quake.process_get_rfid_db,
                 name='GET RFID TID',
                 enabled=True,
                 kwargs={})

    # ------------------------------------------------------------------------------------------------------------------
    # PCAMAP
    pcamap_seq = seq.add_sequence('PCAMAP PROGRAMMING', enabled=True)
    # Verify CMPD
    # TODO: waiting Trac #5852
    pcamap_seq.add_step(steps_quake.process_verify_cmpd,
                        name='VERIFY CMPD SPROM',
                        enabled=False,
                        kwargs={
                            'force': False,
                            'cmpd_description': 'SPROM',
                            'uut_type_key': 'MODEL_NUM',
                            'part_number_key': 'TAN_NUM',
                            'part_revision_key': 'TAN_REVISION_NUMBER',
                            'eco_type': 'VERIFICATION'
                        })

    # PCAMAP Program
    pcamap_seq.add_step(steps_quake.pcamap_write_uut,
                        name='PCAMAP PROGRAM',
                        kwargs={
                            'device_instance': 0,
                            'memory_type': 'vb'
                        })

    # PIDVID Verify
    seq.add_step(steps_quake.process_verify_pidvid,
                 name='PIDVID VERIFY',
                 jump_on_error='CLEAN UP')

    # ------------------------------------------------------------------------------------------------------------------
    # PCBP2

    # PUT PCBP2 CODE HERE

    # ------------------------------------------------------------------------------------------------------------------
    # Clean up
    final_seq = seq.add_sequence('FINAL', finalization=True)
    final_seq.add_step(steps_quake.power_off,
                       name='POWER OFF',
                       kwargs={},
                       group_level=1000)
    final_seq.add_step(steps_quake.clean_up, name='CLEAN UP')
    final_seq.add_step(steps_quake.final, name='END')

    return seq
Ejemplo n.º 22
0
def standard_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    psd = udd.get('uut_config', {}).get('prod_seq_def', {})
    area = __area__  # udd.get(test_area, None)
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, area),
                                        jump_on_error='FINAL')

    # Enable CATS
    # seq.adt_enabled = ['cats']
    # ------------------------------------------------------------------------------------------------------------------
    # Init
    init_seq = seq.add_sequence('INITIALIZATION')
    init_seq.add_step(steps_franklin.init, name='INIT', kwargs={})
    init_seq.add_step(steps_franklin.ud_retrieve,
                      name="RETRIEVE UUT DESCRIPTOR")
    init_seq.add_step(steps_franklin.ud_print_uut_descriptor,
                      name='PRINT DESCRIPTOR')
    init_seq.add_step(steps_franklin.ud_print_uut_config,
                      name='PRINT UUT CONFIG')

    # Area Check
    seq.add_step(steps_franklin.process_area_check,
                 name='AREACHECK',
                 kwargs={},
                 enabled=True)

    # Power ON & Boot
    # Unit should already be powered up from pre-sequence auto-discovery.
    # seq.add_step(steps_franklin.power_cycle_on, name='POWER ON BOOT', group_level=5, enabled=False)

    # Basic Mode
    seq.add_step(steps_franklin.goto_mode,
                 name='MODE BTLDR',
                 kwargs={'mode': 'BTLDR'})

    # MAC Verify Only
    seq.add_step(steps_franklin.process_assign_verify_mac,
                 name='VERIFY MAC',
                 kwargs={'assign': False})

    # Get RFID Data
    seq.add_step(steps_franklin.process_get_rfid_db,
                 name='GET RFID TID',
                 enabled=True,
                 kwargs={})

    # ------------------------------------------------------------------------------------------------------------------
    # PCAMAP
    pcamap_seq = seq.add_sequence('PCAMAP PROGRAMMING', enabled=True)
    # Verify CMPD
    # TODO: waiting Trac #5852
    pcamap_seq.add_step(steps_franklin.process_verify_cmpd,
                        name='VERIFY CMPD SPROM',
                        enabled=False,
                        kwargs={
                            'force': False,
                            'cmpd_description': 'SPROM',
                            'uut_type_key': 'MODEL_NUM',
                            'part_number_key': 'TAN_NUM',
                            'part_revision_key': 'TAN_REVISION_NUMBER',
                            'eco_type': 'VERIFICATION'
                        })

    # PCAMAP Program
    pcamap_seq.add_step(steps_franklin.pcamap_write_uut,
                        name='PCAMAP PROGRAM',
                        kwargs={
                            'device_instance': 0,
                            'memory_type': 'vb'
                        })

    # PIDVID Verify
    seq.add_step(steps_franklin.process_verify_pidvid,
                 name='PIDVID VERIFY',
                 jump_on_error='CLEAN UP')

    # ------------------------------------------------------------------------------------------------------------------
    # Load Images
    image_load_seq = seq.add_sequence('IMAGE LOADING', enabled=True)
    image_load_seq.add_step(steps_franklin.goto_mode,
                            name='MODE LINUX',
                            kwargs={'mode': 'LINUX'})
    image_load_seq.add_step(steps_franklin.linux_set_network_interface,
                            name='SET LINUX NET INTF')
    image_load_seq.add_step(
        steps_franklin.load_hw_images,
        name='LOAD HW IMAGES',
        kwargs={
            'master_list':
            ['btldr', 'linux', 'diag', 'fpga', 'mcu', 'nic', 'SBC_CFG'],
            'force':
            False
        },
        enabled=False)
    image_load_seq.add_step(steps_franklin.ios_install_supplemental_images,
                            name='LOAD IOS SUPPLEMENTAL IMAGES',
                            enabled=True)

    # ------------------------------------------------------------------------------------------------------------------
    # Update any Images via stardust
    # SBC update will ALWAYS program; turn off for FST.
    image_seq = seq.add_sequence('DEVICE IMAGE PROGRAMMING', enabled=True)
    image_secboot_seq = image_seq.add_sequence(
        'DEVICE IMAGE PROGRAMMING SECBOOT')
    image_secboot_seq.add_step(steps_franklin.goto_mode,
                               name='MODE BTLDR',
                               kwargs={'mode': 'BTLDR'})
    image_secboot_seq.add_step(steps_franklin.upgrade_btldr, name='PROG BTLDR')
    image_secboot_seq.add_step(steps_franklin.goto_mode,
                               name='MODE STARDUST',
                               kwargs={'mode': 'STARDUST'})
    image_secboot_seq.add_step(steps_franklin.upgrade_fpga, name='PROG FPGA')
    image_secboot_seq.add_step(steps_franklin.power_cycle_on,
                               name='POWER ON REBOOT',
                               kwargs={'contingent': True},
                               group_level=5)
    image_mcu_seq = image_seq.add_sequence('DEVICE IMAGE PROGRAMMING MCU')
    image_mcu_seq.add_step(steps_franklin.goto_mode,
                           name='MODE STARDUST',
                           kwargs={'mode': 'STARDUST'})
    image_mcu_seq.add_step(steps_franklin.diags_switch_mcu_mode,
                           name='MCU MODE IOS',
                           kwargs={'kkmode': 'IOS'})
    image_mcu_seq.add_step(steps_franklin.upgrade_mcu,
                           name='PROG MCU',
                           enabled=False)
    image_nic_seq = image_seq.add_sequence('DEVICE IMAGE PROGRAMMING NIC')
    image_nic_seq.add_step(steps_franklin.goto_mode,
                           name='MODE LINUX',
                           kwargs={'mode': 'LINUX'})
    image_nic_seq.add_step(steps_franklin.upgrade_nic,
                           name='PROG NIC',
                           enabled=True)
    image_sbc_seq = image_seq.add_sequence('DEVICE IMAGE PROGRAMMING SBC')
    image_sbc_seq.add_step(steps_franklin.goto_mode,
                           name='MODE STARDUST',
                           kwargs={'mode': 'STARDUST'})
    image_sbc_seq.add_step(steps_franklin.update_sbc,
                           name='PROG SBC',
                           enabled=False)

    # ------------------------------------------------------------------------------------------------------------------
    # Identity Protection Programming
    idpro_seq = seq.add_sequence('IDENTITY PROTECTION')
    idpro_main_subseq = idpro_seq.add_sequence('IDENTITY PROTECTION MAINBOARD',
                                               enabled=True)
    idpro_main_subseq.add_step(steps_franklin.power_cycle_on,
                               name='POWER ON REBOOT',
                               group_level=5)
    idpro_main_subseq.add_step(steps_franklin.goto_mode,
                               name='MODE STARDUST',
                               kwargs={'mode': 'STARDUST'})
    idpro_main_subseq.add_step(steps_franklin.diags_sysinit,
                               name='DIAG SYSINIT')
    idpro_main_subseq.add_step(steps_franklin.x509sudi_sign_certificate,
                               name='X509 SHA1',
                               kwargs={'x509_sudi_hash': 'SHA1'},
                               enabled=True)
    idpro_main_subseq.add_step(steps_franklin.act2_sign_chip,
                               name='ACT2',
                               kwargs={
                                   'device_instance': 0,
                                   'keytype': 'ACT2-RSA'
                               },
                               enabled=True)
    idpro_main_subseq.add_step(steps_franklin.act2_sign_chip,
                               name='ACT2 2099',
                               kwargs={
                                   'device_instance': 0,
                                   'keytype': 'ACT2-HARSA'
                               },
                               enabled=True)
    idpro_main_subseq.add_step(steps_franklin.x509sudi_sign_certificate,
                               name='X509 SHA256',
                               kwargs={
                                   'x509_sudi_hash': 'SHA256',
                                   'keytype': 'ACT2-RSA'
                               },
                               enabled=True)
    idpro_main_subseq.add_step(steps_franklin.x509sudi_sign_certificate,
                               name='X509 SHA256 2099',
                               kwargs={
                                   'x509_sudi_hash': 'CMCA3',
                                   'keytype': 'ACT2-HARSA'
                               },
                               enabled=False)

    # Peripherals for special builds only (i.e. proto, etc.).
    if psd.get(area, {}).get('idpro_periphs', False):
        idpro_peripheral_subseq = idpro_seq.add_sequence(
            'IDENTITY PROTECTION PERIPHERALS', enabled=True)
        idpro_peripheral_subseq.add_step(steps_franklin.goto_mode,
                                         name='MODE STARDUST',
                                         kwargs={'mode': 'STARDUST'})
        idpro_peripheral_subseq.add_step(steps_franklin.diags_sysinit,
                                         name='DIAG SYSINIT')
        idpro_peripheral_subseq.add_step(steps_franklin.act2_sign_chip,
                                         name='ACT2 1',
                                         kwargs={
                                             'device_instance': 1,
                                             'keytype': 'ACT2-RSA'
                                         },
                                         enabled=True)
        idpro_peripheral_subseq.add_step(steps_franklin.act2_sign_chip,
                                         name='ACT2 2',
                                         kwargs={
                                             'device_instance': 2,
                                             'keytype': 'ACT2-RSA'
                                         },
                                         enabled=True)
        idpro_peripheral_subseq.add_step(steps_franklin.act2_sign_chip,
                                         name='ACT2 3',
                                         kwargs={
                                             'device_instance': 3,
                                             'keytype': 'ACT2-RSA'
                                         },
                                         enabled=True)
        idpro_peripheral_subseq.add_step(steps_franklin.act2_sign_chip,
                                         name='ACT2 4',
                                         kwargs={
                                             'device_instance': 4,
                                             'keytype': 'ACT2-RSA'
                                         },
                                         enabled=True)

    # IOS Boot Test and IdPro Check
    idpro_seq.add_step(steps_franklin.goto_mode,
                       name='MODE IOSE',
                       kwargs={'mode': 'IOSE'})
    idpro_seq.add_step(steps_franklin.ios_verify_idpro,
                       name='ID PRO VERIFICATION',
                       kwargs={})
    idpro_seq.add_step(steps_franklin.goto_mode,
                       name='MODE BTLDR',
                       kwargs={'mode': 'BTLDR'})
    idpro_seq.add_step(steps_franklin.process_assign_verify_mac,
                       name='VERIFY MAC',
                       kwargs={'assign': False})

    # ------------------------------------------------------------------------------------------------------------------
    # Power Cycle Testing
    seq.add_step(steps_franklin.power_power_cycle_testing,
                 name='POWER CYCLE TEST')

    # ==================================================================================================================
    # Main Loop Tests
    # ------------------------------------------------------------------------------------------------------------------
    fst_loop_seq = seq.add_sequence('SYSTEM LOOP TESTS',
                                    iterations=(aplib.ITERATION_TIME, 30))
    fst_loop_seq.iterations.type = aplib.ITERATION_TIME
    fst_loop_seq.iterations.value = psd.get(area, {}).get(
        'total_loop_time_secs', 1) if psd else 1
    fst_loop_seq.add_step(steps_franklin.loop_marker,
                          name='FST LOOP',
                          kwargs={'title': 'FST'})

    # ------------------------------------------------------------------------------------------------------------------
    # Diag Testing
    diag_seq = fst_loop_seq.add_sequence('DIAGNOSTIC TESTS', enabled=True)
    diag_seq.add_step(steps_franklin.goto_mode,
                      name='MODE STARDUST',
                      kwargs={'mode': 'STARDUST'})
    diag_seq.add_step(steps_franklin.diags_sysinit, name='SYSINIT')
    diag_seq.add_step(steps_franklin.diags_rtc_chkset_test,
                      name='RTC CHK SET TEST',
                      kwargs={})
    diag_seq.add_step(steps_franklin.diags_psu_check,
                      name='PSU CHECK',
                      kwargs={})
    diag_seq.add_step(steps_franklin.diags_update_mcu_settings,
                      name='MCU SETTINGS',
                      kwargs={})
    diag_seq.add_step(steps_franklin.diags_temperature_test,
                      name='TEMPERATURE TEST',
                      kwargs={'operational_state': 'diag'},
                      enabled=True)
    diag_seq.add_step(steps_franklin.diags_vmargin_test,
                      name='VMARGIN TEST',
                      kwargs={
                          'device_instance': 0,
                          'margin_level': 'NOMINAL'
                      },
                      enabled=True)
    diag_seq.add_step(steps_franklin.diags_fan_test,
                      name='FAN TEST',
                      kwargs={},
                      enabled=True)
    diag_seq.add_step(steps_franklin.diags_stackrac_test,
                      name='STACKRAC TEST',
                      kwargs={},
                      enabled=True)
    diag_seq.add_step(steps_franklin.diags_serdeseye_sif_test,
                      name='SERDES EYE SIF TEST',
                      kwargs={},
                      enabled=True)
    diag_seq.add_step(steps_franklin.diags_serdeseye_nif_test,
                      name='SERDES EYE NIF TEST',
                      kwargs={},
                      enabled=True)
    # Diag Testlist build-out
    dynamic_sequence_builder.build_diag_testlist_subseq(
        diag_seq=diag_seq,
        container=container,
        udd=udd,
        step_module=steps_franklin,
        category=None,
        enabled=True)

    # ------------------------------------------------------------------------------------------------------------------
    # Traffic Testing
    traf_seq = fst_loop_seq.add_sequence('TRAFFIC TESTS', enabled=True)
    traf_seq.add_step(steps_franklin.goto_mode,
                      name='MODE STARDUST PRETRAF',
                      kwargs={'mode': 'STARDUST'})
    traf_seq.add_step(steps_franklin.diags_sysinit,
                      name='DIAG SYSINIT PRETRAF')
    dynamic_sequence_builder.build_traffic_cases_subseq(
        traffic_seq=traf_seq,
        container=container,
        udd=udd,
        step_module=steps_franklin,
        category=None,
        enabled=True)

    seq.add_step(steps_franklin.loop_marker,
                 name='FST LOOPS DONE',
                 kwargs={
                     'title': 'FST (Loops completed)',
                     'close_loop': True
                 })
    # ==================================================================================================================

    # ------------------------------------------------------------------------------------------------------------------
    # Power OFF
    seq.add_step(steps_franklin.power_off, name='POWER OFF', group_level=1000)

    # Clean up
    final_seq = seq.add_sequence('FINAL', finalization=True)
    final_seq.add_step(steps_franklin.power_off,
                       name='POWER OFF',
                       kwargs={},
                       group_level=1000)
    final_seq.add_step(steps_franklin.clean_up, name='CLEAN UP')
    final_seq.add_step(steps_franklin.final, name='END')

    return seq
Ejemplo n.º 23
0
def standard_switch_sequence_definition():
    try:
        container = aplib.get_my_container_key()
    except Exception:
        raise Exception("Cannot use this Apollo version!")
    udd = aplib.get_cached_data('{0}_uut_descriptor'.format(container))
    pf = udd.get('product_family').upper()
    pc = udd.get('product_codename').upper()
    psd = udd.get('uut_config', {}).get('prod_seq_def', {})
    area = __area__  # udd.get('test_area', None)
    seq = aplib.get_sequence_definition('{0} {1} {2} {3} SEQ'.format(
        __product_line__, pf, pc, area),
                                        jump_on_error='FINAL')

    # ------------------------------------------------------------------------------------------------------------------
    # Init
    init_seq = seq.add_sequence('INITIALIZATION')
    init_seq.add_step(steps_nyquist.init, name='INIT', kwargs={})
    init_seq.add_step(steps_nyquist.ud_retrieve,
                      name="RETRIEVE UUT DESCRIPTOR")
    init_seq.add_step(steps_nyquist.ud_print_uut_descriptor,
                      name='PRINT DESCRIPTOR')
    init_seq.add_step(steps_nyquist.ud_print_uut_config,
                      name='PRINT UUT CONFIG')

    # Area Check
    seq.add_step(steps_nyquist.process_area_check,
                 name='AREACHECK',
                 kwargs={},
                 enabled=True)

    # Power ON & Boot
    # Unit should already be powered up from pre-sequence auto-discovery.
    # seq.add_step(steps_nyquist.power_cycle_on, name='POWER ON BOOT', group_level=5, enabled=False)

    # Basic Mode
    seq.add_step(steps_nyquist.goto_mode,
                 name='MODE BTLDR',
                 kwargs={'mode': 'BTLDR'})

    # ------------------------------------------------------------------------------------------------------------------
    # PCAMAP
    pcamap_seq = seq.add_sequence('PCAMAP PROGRAMMING', enabled=True)
    # Verify CMPD
    # TODO: waiting Trac #5852
    pcamap_seq.add_step(steps_nyquist.process_verify_cmpd,
                        name='VERIFY CMPD SPROM',
                        enabled=False,
                        kwargs={
                            'force': False,
                            'cmpd_description': 'SPROM',
                            'uut_type_key': 'MODEL_NUM',
                            'part_number_key': 'TAN_NUM',
                            'part_revision_key': 'TAN_REVISION_NUMBER',
                            'eco_type': 'VERIFICATION'
                        })

    # PCAMAP Program
    pcamap_seq.add_step(steps_nyquist.pcamap_write_uut,
                        name='PCAMAP PROGRAM',
                        kwargs={
                            'device_instance': 0,
                            'memory_type': 'vb'
                        })

    # PIDVID Verify
    seq.add_step(steps_nyquist.process_verify_pidvid,
                 name='PIDVID VERIFY',
                 jump_on_error='CLEAN UP')

    # ------------------------------------------------------------------------------------------------------------------
    # Diag Testing
    diag_seq = seq.add_sequence('DIAGNOSTIC TESTS', enabled=True)
    diag_seq.add_step(steps_nyquist.goto_mode,
                      name='MODE STARDUST',
                      kwargs={'mode': 'STARDUST'})
    diag_seq.add_step(steps_nyquist.diags_sysinit, name='SYSINIT')
    diag_seq.add_step(steps_nyquist.diags_psu_check,
                      name='PSU CHECK',
                      kwargs={})

    # Diag Testlist build-out
    dynamic_sequence_builder.build_diag_testlist_subseq(
        diag_seq=diag_seq,
        container=container,
        udd=udd,
        step_module=steps_nyquist,
        category=None,
        enabled=True)

    # ------------------------------------------------------------------------------------------------------------------
    # Traffic Testing
    traf_seq = seq.add_sequence('TRAFFIC TESTS', enabled=True)
    traf_seq.add_step(steps_nyquist.goto_mode,
                      name='MODE STARDUST PRETRAF',
                      kwargs={'mode': 'STARDUST'})
    traf_seq.add_step(steps_nyquist.diags_sysinit, name='DIAG SYSINIT PRETRAF')
    dynamic_sequence_builder.build_traffic_cases_subseq(
        traffic_seq=traf_seq,
        container=container,
        udd=udd,
        step_module=steps_nyquist,
        category=None,
        enabled=True)

    # ------------------------------------------------------------------------------------------------------------------
    # Power OFF
    seq.add_step(steps_nyquist.power_off, name='POWER OFF', group_level=1000)

    # Clean up
    final_seq = seq.add_sequence('FINAL', finalization=True)
    final_seq.add_step(steps_nyquist.power_off,
                       name='POWER OFF',
                       kwargs={},
                       group_level=1000)
    final_seq.add_step(steps_nyquist.clean_up, name='CLEAN UP')
    final_seq.add_step(steps_nyquist.final, name='END')

    return seq
Ejemplo n.º 24
0
def main_sequence_definition():
    """ Run sequence that includes power on & off, uut programming,
        check eeprom against label/cmpd, test connections, MTS test, and etc.

        It has multi steps sub-sequence in sequence and test are divided into individual test
        instead of diag run all for Adaptive test compliance and ease in debugging failures.

    :return: seq
    """
    seq = lib.get_sequence_definition('MAIN INT PRODUCT SEQ')
    seq.add_step(main_initialize, name='MAIN_INITIALIZE')
    seq.add_step('DC_POWER_ON',
                 codepath=code_path,
                 function='uut_power_on',
                 kwargs={'mode': DC},
                 loop_on_error=2)
    seq.add_step('PORT_ON_EGIGA1',
                 codepath=code_path,
                 function='switch_port_on',
                 kwargs={'interface': 'egiga1'},
                 loop_on_error=1)
    seq.add_step(clear_storage, name='CLEAR_STORAGE')
    seq.add_step('UPGRADE_UBOOT',
                 codepath=code_path,
                 function='upgrade_uboot',
                 kwargs={'speed': 10},
                 loop_on_error=1)
    seq.add_step('DOWNLOAD_MGIG_FW',
                 codepath=code_path,
                 function='download_mgig_fw',
                 precondition="userdict['mgig_fw_need']",
                 loop_on_error=1)
    seq.add_step(secure_boot, name='SECURE_BOOT')
    seq.add_step(create_nand_partition, name='CREATE_NAND_PARTITION')
    seq.add_step(load_nand_image_part_1,
                 name='LOAD_NAND_IMAGE_PART_1',
                 kwargs={'speed': 100})
    seq.add_step(load_nand_image_part_2,
                 name='LOAD_NAND_IMAGE_PART_2',
                 kwargs={'speed': 1000})
    seq.add_step(set_boot_env, name='SET_BOOT_ENV')
    seq.add_step(reset_uboot, name='RESET_UBOOT')
    seq.add_step(em_detect, name='DETECT_EM')
    seq.add_step(em_check_link, name='CHECK_EM_LINK')
    seq.add_step('BOOT_MFG_LINUX_1',
                 codepath=code_path,
                 function='boot_mfg_image',
                 loop_on_error=1)
    seq.add_step(program_cookie, name='PROGRAM_COOKIE')
    seq.add_step(mb_mac_fetch, name='MB_MAC_FETCH')
    seq.add_step(radio_mac_fetch, name='RADIO_MAC_FETCH')
    seq.add_step('PORT_ON_EGIGA2',
                 codepath=code_path,
                 function='switch_port_on',
                 kwargs={'interface': 'egiga2'},
                 loop_on_error=1)
    seq.add_step('BOOT_MFG_LINUX_2',
                 codepath=code_path,
                 function='reload_mfg_image',
                 loop_on_error=1)
    seq.add_step(verify_cookie, name='VERIFY_COOKIE')
    seq.add_step(em_talk, name='EM_TALK')
    seq.add_step(led_test,
                 name='LED_TEST',
                 precondition="userdict['led_test_need']")
    seq.add_step('CAPWAP_PING_TEST',
                 codepath=code_path,
                 function='capwap_ping_test',
                 loop_on_error=1)
    seq.add_step('LINUX_PING_TEST_5G',
                 codepath=code_path,
                 function='linux_ping_test',
                 kwargs={'speed': 5000},
                 loop_on_error=1)
    seq.add_step('LINUX_PING_TEST_2G',
                 codepath=code_path,
                 function='linux_ping_test',
                 kwargs={'speed': 2500},
                 loop_on_error=1)
    seq.add_step('LINUX_PING_TEST_100M',
                 codepath=code_path,
                 function='linux_ping_test',
                 kwargs={'speed': 100},
                 loop_on_error=1)
    seq.add_step('LINUX_PING_TEST_1000M',
                 codepath=code_path,
                 function='linux_ping_test',
                 kwargs={'speed': 1000},
                 loop_on_error=1)
    seq.add_step('POE_POWER_ON',
                 codepath=code_path,
                 function='uut_power_on',
                 kwargs={'mode': POE},
                 loop_on_error=1)
    seq.add_step('BOOT_MFG_LINUX_3',
                 codepath=code_path,
                 function='boot_mfg_image',
                 loop_on_error=1)
    seq.add_step(usb_test, name='USB_TEST')
    seq.add_step('X509_PROGRAM', codepath=code_path, function='program_x509')
    seq.add_step(validate_x509, name='X509_VALIDATE')
    seq.add_step('ACT2_PROGRAM', codepath=code_path, function='program_act2')
    seq.add_step(validate_act2, name='ACT2_VALIDATE')
    seq.add_step(clear_storage, name='CLEAR_STORAGE_2')
    seq.add_step(set_factory_default, name='SET_FACTORY_DEFAULT')
    seq.add_step(main_finalize,
                 name='MAIN_FINALIZE',
                 group_level=lib.FINALIZATION)
    return seq