blob: 67b7ac2c75b016270e4f122ce33a11640e81a4c8 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from autotest_lib.client.bin import utils
from autotest_lib.client.common_lib import error
from autotest_lib.client.cros import kernel_config
from import GraphicsTest
class graphics_KernelConfig(GraphicsTest):
"""Examine a kernel build CONFIG list to verify related flags.
version = 1
arch = None
userspace_arch = None
# Sanity checks; should be present in builds as builtins.
# Sanity checks; should be present in builds as modules.
# Sanity checks; should be enabled.
# Sanity checks; should be disabled.
def setup(self):
""" Test setup. """
self.arch = utils.get_arch()
self.userspace_arch = utils.get_arch_userspace()
# Report the full uname for anyone reading logs.'Running %s kernel, %s userspace: %s',
self.arch, self.userspace_arch,
utils.system_output('uname -a'))
def run_once(self):
The actual test that read config and check.
# Load the list of kernel config variables.
config = kernel_config.KernelConfig()
# Run the static checks.
map(config.has_builtin, self.IS_BUILTIN)
map(config.has_module, self.IS_MODULE)
map(config.is_enabled, self.IS_ENABLED)
map(config.is_missing, self.IS_MISSING)
# Raise a failure if anything unexpected was seen.
if len(config.failures()):
raise error.TestFail((", ".join(config.failures())))