Пример #1
0
def test_run_jtag_sanity(test, board):
    """Executing jtag boot sanity tests"""

    boot = sanity = test.replace("-", " ")
    board = board(test_name="zynqmp", params=["zcu106_bsp"], xsdb=False)
    petalinux_boot(board.config,
                   boottype=boot,
                   hwserver=socket.gethostbyname("localhost"))

    if sanity in ("prebuilt 2", "uboot"):
        uboot_login(board.serial)
    else:
        linux_login_cons(board.serial)
        board.serial.runcmd(cmd="ifconfig")
Пример #2
0
def test_run_jtagboot(board, test_case):
    board_name, component = test_case.split("-")
    machine = board_name
    variant = get_variant(machine)
    board = board(test_name=component, params=[variant, machine], machine=machine)
    setup_logger(board.config.logDir, console_level=logging.DEBUG)
    config = board.config
    images_dir = config["deployDir"]

    jtag_boot(board.serial, board.xsdb, config, images_dir, variant)

    linux_login_cons(
        board.serial, user="******", password="******", login=True, timeout=300
    )
Пример #3
0
def test_run_jtag_sanity(test, board):
    """Executing jtag boot sanity tests"""

    test_dict = sanity_tests.get_test_params(test)
    boot = sanity = test_dict["sanity"].replace("-", " ")
    board = board(test_name=test_dict["platform"],
                  params=[test_dict["bsp"]],
                  xsdb=False)
    petalinux_boot(board.config,
                   boottype=boot,
                   hwserver=socket.gethostbyname("localhost"))

    if sanity in ("prebuilt 2", "uboot"):
        uboot_login(board.serial)
    else:
        linux_login_cons(board.serial)
        board.serial.runcmd(cmd="ifconfig")
Пример #4
0
def test_run_jtagboot(board, test):
    test_dict = osl_tests.get_test_params(test)
    machine = test_dict["machine"]
    variant = get_variant(machine)
    board = board(
        test_name=test_dict["test"],
        params=[variant, machine],
        machine=machine,
    )
    setup_logger(board.config.logDir, console_level=logging.DEBUG)
    config = board.config
    images_dir = config["deployDir"]

    jtag_boot(board.serial, board.xsdb, config, images_dir, variant)

    linux_login_cons(board.serial,
                     user="******",
                     password="******",
                     login=True,
                     timeout=300)
Пример #5
0
            "microblaze": BootMicroblaze,
            "versal": BootVersal,
        }
        # Instatiating Boot class based on variant passed
        BootLinux = class_dict[self.variant](self.xsdbcon, self.images_dir,
                                             self.config)
        getattr(BootLinux, f"_{self.boot}_boot")()

    def set_rootfs(self):
        self.rootfs_full_path = ""
        self.rootfs_path = os.path.join(self.config["rootfs_path"],
                                        self.variant)
        for file in os.listdir(self.rootfs_path):
            if file.endswith("rootfs.cpio.gz.u-boot"):
                self.rootfs_full_path = os.path.join(self.rootfs_path, file)
        if not self.rootfs_full_path:
            assert "Rootfs is Not found in path"
        else:
            self.config["rootfs_path_full"] = self.rootfs_full_path


if __name__ == "__main__":
    # Instantiate JtagBoot with xsdbcon, config, ImagesDir and Platform
    linux_osl = JtagBoot(board.xsdb, config, images_dir, variant)
    # Validate for Linux console
    linux_login_cons(board.serial,
                     user="******",
                     password="******",
                     login=True,
                     timeout=300)