Ejemplo n.º 1
0
def test_component(test, create_configuration):
    test_dict = osl_tests.get_test_params(test)
    component = test_dict["test"]
    machine = test_dict["machine"]
    variant = get_variant(machine)
    board = re.sub("_", "-", machine)

    if component not in components:
        elf = test_dict["test"]
        if variant:
            config = create_configuration(params=["elf", variant, elf],
                                          machine=machine)
            overrides(config, variant)

        if elf:
            overrides(config, elf)
        else:
            config = create_configuration(params=[component])

        config["variant"] = variant
        config["xsct_elf_name"] = elf
        mkdir(config["deploy_artifacts"])
        # Call Buildapp
        assert xsct.xsct_builder(config)
    else:
        if variant != None:
            config = create_configuration(params=[component, variant],
                                          machine=machine)
            config["variant"] = variant
            overrides(config, variant)
            overrides(config, board)
        else:
            config = create_configuration(params=[component], machine=machine)
        opensource_builder(config, component, variant, board, machine)
Ejemplo n.º 2
0
def opensource_builder(config, component, variant=None, board=None):
    config["component"] = component
    if component == "dtb":
        overrides(
            config,
            ["{config['dtb_buildtype']}_data", "static_data", variant, board],
        )
        builder = BuildDtb(config, board=board, variant=variant)
    elif component == "rootfs":
        builder = BuildRootfsModule(config, board=board, variant=variant)
    else:
        builder = BuildOsl(config)

    builder.setup_src()
    builder.configure()
    builder.compile()
    builder.deploy()
Ejemplo n.º 3
0
def test_build(create_configuration, component):
    """Building and compiling of hello world application from src code, FSBL build which is needed to run any zynqmp application on board"""

    # Create configurations using fixture
    config = create_configuration(params=[component])
    # override hello world and fsbl specific parameters from conf based on component passed
    config = overrides(config, component)
    assert xsct.xsct_builder(config, setup=False)
Ejemplo n.º 4
0
def test_component(test_case, create_configuration):
    board, component = test_case.split("-")
    machine = board
    variant = get_variant(machine)

    if component not in components:
        elf = component
        if variant:
            config = create_configuration(
                params=["elf", variant, elf],
                overrides=[f"osl_demo_basic/component/elf.py"],
                machine=machine,
            )
            overrides(config, variant)

        if elf:
            overrides(config, elf)
        else:
            config = create_configuration(
                params=[component],
                overrides=[f"osl_demo_basic/component/elf.py"])

        config["variant"] = variant
        config["xsct_elf_name"] = elf
        mkdir(config["deploy_artifacts"])
        # Call Buildapp
        assert xsct.xsct_builder(config)
    else:
        if variant != None:
            config = create_configuration(
                params=[component, variant],
                overrides=[f"osl_demo_basic/component/{component}.py"],
                machine=machine,
            )
            config["variant"] = variant
            overrides(config, variant)
            overrides(config, board)

        else:
            config = create_configuration(
                params=[component],
                overrides=[f"osl_demo_basic/component/{component}.py"],
                machine=machine,
            )
        opensource_builder(config, component, variant, board)
Ejemplo n.º 5
0
 def _board(
     board_type=config.get("board_interface"),
     reboot=True,
     xsdb=True,
     hwserver=True,
     interface=None,
     test_name=None,
     base_params=None,
     params=None,
     machine=None,
     override=None,
 ):
     config = create_configuration(test_name=test_name,
                                   base_params=base_params,
                                   params=params,
                                   machine=machine)
     bb = Basebuild(config, setup=False)
     bb.configure()
     if override is not None:
         config = overrides(config, override)
     if board_type == "network_target":
         sboard = network_board_session
     elif board_type == "host_target":
         sboard = host_board_session
     elif board_type == "systest":
         sboard = systest_board_session
     else:
         raise Exception(f"Board type {board_type} is not supported.")
     sboard.config = config
     sboard.reboot = reboot
     if sboard.serial:
         sboard.serial.mode = reboot
     sboard.invoke_xsdb = xsdb
     sboard.invoke_hwserver = hwserver
     if interface:
         sboard.config["board_interface"] = interface
     sboard.start()
     return sboard