avocado-setup.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:tests 作者: open-power-host-os 项目源码 文件源码
def need_bootstrap():
    """
    Check if bootstrap required
    :return: True if bootstrap is needed
    """
    logger.debug("Check if bootstrap required")
    needsBootstrap = False
    # Check for avocado
    status, output = commands.getstatusoutput('avocado')
    if 'command not ' in output:
        logger.info("Avocado needs to be installed")
        needsBootstrap = True
    # Check for avocado-vt
    for plugin in ['vt', 'vt-list', 'vt-bootstrap']:
        if not is_avocado_plugin_avl(plugin):
            logger.info("Avocado %s plugin needs to installed", plugin)
            needsBootstrap = True
    # Check for avocado-tests
    for repo in TEST_REPOS:
        repo_name = repo.split('/')[-1].split('.')[0]
        if not os.path.isdir(os.path.join(TEST_DIR, repo_name)):
            logger.info("Test needs to be downloaded/updated")
            needsBootstrap = True
    return needsBootstrap
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号