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
评论列表
文章目录