def selftest(lab: None = None) -> None: """Run all selftests.""" with SelftestHost() as lh: tc.testsuite( selftest_failing, selftest_skipping, selftest_uname, selftest_user, machine.selftest_machine_reentrant, machine.selftest_machine_labhost_shell, machine.selftest_machine_ssh_shell, machine.selftest_machine_sshlab_shell, path.selftest_path_stat, path.selftest_path_integrity, path.selftest_path_files, board_machine.selftest_board_power, board_machine.selftest_board_uboot, board_machine.selftest_board_uboot_noab, board_machine.selftest_board_linux, board_machine.selftest_board_linux_uboot, board_machine.selftest_board_linux_standalone, board_machine.selftest_board_linux_nopw, board_machine.selftest_board_linux_bad_console, testcase.selftest_with_lab, testcase.selftest_with_uboot, testcase.selftest_with_linux, lab=lh, )
def selftest(lab: typing.Optional[linux.Lab] = None, ) -> None: """Run all selftests.""" with lab or tbot.acquire_lab() as lh: tc.testsuite( selftest_failing, selftest_skipping, selftest_uname, selftest_user, machine.selftest_machine_reentrant, machine.selftest_machine_labhost_shell, machine.selftest_machine_ssh_shell, machine.selftest_machine_sshlab_shell, path.selftest_path_stat, path.selftest_path_integrity, board_machine.selftest_board_power, board_machine.selftest_board_uboot, board_machine.selftest_board_uboot_noab, board_machine.selftest_board_linux, board_machine.selftest_board_linux_uboot, board_machine.selftest_board_linux_standalone, board_machine.selftest_board_linux_nopw, board_machine.selftest_board_linux_bad_console, testcase.selftest_with_lab, testcase.selftest_with_uboot, testcase.selftest_with_linux, lab=lh, )
def gettarget(mach: typing.Optional[linux.LinuxMachine] = None, ) -> None: with contextlib.ExitStack() as cx: if mach is None: lh = cx.enter_context(tbot.acquire_lab()) b = cx.enter_context(tbot.acquire_board(lh)) lnx = cx.enter_context(tbot.acquire_linux(b)) else: lnx = mach tc.testsuite(getcpu, getlinuxversion, getyoctoversion, mach=lnx)
def selftest_tc(lab: typing.Optional[linux.LabHost] = None, ) -> None: """Test builtin testcases.""" with lab or tbot.acquire_lab() as lh: tc.testsuite( selftest_tc_git_checkout, # noqa: F405 selftest_tc_git_am, # noqa: F405 selftest_tc_git_bisect, # noqa: F405 selftest_tc_shell_copy, # noqa: F405 lab=lh, )
def selftest_tc(lab: typing.Optional[linux.Lab] = None, ) -> None: """Run selftests for builtin testcases.""" with lab or tbot.acquire_lab() as lh: tc.testsuite( selftest_tc_git_checkout, # noqa: F405 selftest_tc_git_am, # noqa: F405 selftest_tc_git_apply, # noqa: F405 selftest_tc_git_bisect, # noqa: F405 selftest_tc_shell_copy, # noqa: F405 selftest_tc_build_toolchain, # noqa: F405 selftest_tc_uboot_checkout, # noqa: F405 selftest_tc_uboot_build, # noqa: F405 selftest_tc_uboot_patched_bisect, # noqa: F405 selftest_tc_kconfig, # noqa: F405 lab=lh, )
def selftest(lab: None = None) -> None: """Run all selftests.""" if "really-run-old-selftests" not in tbot.flags: tbot.log.warning( """\ You just tried invoking the old selftest suite for tbot. This is deprecated! Instead, please run tbot's new selftests like this: cd /path/to/tbot-sources python3 -m pytest selftest/ If you really want to run the old (unsupported) selftest suite, pass `-f really-run-old-selftests` on the command line. """ ) raise NotImplementedError with SelftestHost() as lh: tc.testsuite( selftest_failing, selftest_skipping, selftest_uname, selftest_user, machine.selftest_machine_reentrant, machine.selftest_machine_labhost_shell, machine.selftest_machine_ssh_shell, machine.selftest_machine_sshlab_shell, path.selftest_path_stat, path.selftest_path_integrity, path.selftest_path_files, board_machine.selftest_board_power, board_machine.selftest_board_uboot, board_machine.selftest_board_uboot_noab, board_machine.selftest_board_linux, board_machine.selftest_board_linux_uboot, board_machine.selftest_board_linux_standalone, board_machine.selftest_board_linux_nopw, board_machine.selftest_board_linux_bad_console, testcase.selftest_with_lab, testcase.selftest_with_uboot, testcase.selftest_with_linux, lab=lh, )
def selftest(lab: typing.Optional[linux.LabHost] = None,) -> None: with lab or tbot.acquire_lab() as lh: tc.testsuite( selftest_failing, selftest_uname, selftest_user, selftest_machine_reentrant, # noqa: F405 selftest_machine_labhost_shell, # noqa: F405 selftest_machine_ssh_shell, # noqa: F405 selftest_machine_sshlab_shell, # noqa: F405 selftest_path_stat, # noqa: F405 selftest_path_integrity, # noqa: F405 selftest_board_power, # noqa: F405 selftest_board_uboot, # noqa: F405 selftest_board_uboot_noab, # noqa: F405 selftest_board_linux, # noqa: F405 selftest_board_linux_uboot, # noqa: F405 selftest_board_linux_standalone, # noqa: F405 selftest_board_linux_nopw, # noqa: F405 lab=lh, )