1# Copyright 2014 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5from autotest_lib.client.bin import test 6from autotest_lib.client.common_lib import error 7from autotest_lib.client.cros import kernel_config 8 9class kernel_ConfigVerifyPPP(test.test): 10 """Checks that PPP modules are present. 11 """ 12 version = 1 13 IS_MODULE = [ 14 # Sanity checks; should be present in builds as modules. 15 'PPPOE', 16 'PPP_MPPE', 17 'PPP_BSDCOMP', 18 'PPP_DEFLATE', 19 'PPP_SYNC_TTY', 20 ] 21 22 def run_once(self): 23 # Load the list of kernel config variables. 24 config = kernel_config.KernelConfig() 25 config.initialize() 26 27 # Run the static checks. 28 map(config.has_module, self.IS_MODULE) 29 30 # Raise a failure if anything unexpected was seen. 31 if len(config.failures()): 32 raise error.TestFail((", ".join(config.failures()))) 33