em_cpuidle.py 文件源码

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

项目:avocado-misc-tests 作者: avocado-framework-tests 项目源码 文件源码
def setUp(self):
        """
        Verify it is baremetal
        Install the cpupower tool
        """
        if not os.path.exists('/proc/device-tree/ibm,opal/power-mgt'):
            self.cancel("Supported only on Power Non Virutalized environment")
        smm = SoftwareManager()
        detected_distro = distro.detect()
        if 'Ubuntu' in detected_distro.name:
            deps = ['linux-tools-common', 'linux-tools-%s'
                    % platform.uname()[2]]
        else:
            deps = ['kernel-tools']
        for package in deps:
            if not smm.check_installed(package) and not smm.install(package):
                self.cancel('%s is needed for the test to be run' % package)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号