Package SCons :: Module SConf :: Class CheckContext
[hide private]
[frames] | no frames]

Class CheckContext

source code

object --+

Provides a context for configure tests. Defines how a test writes to the screen and log file.

A typical test is just a callable with an instance of CheckContext as first argument:

def CheckCustom(context, ...) context.Message('Checking my weird test ... ') ret = myWeirdTestFunction(...) context.Result(ret)

Often, myWeirdTestFunction will be one of context.TryCompile/context.TryLink/context.TryRun. The results of those are cached, for they are only rebuild, if the dependencies have changed.

Instance Methods [hide private]
__init__(self, sconf)
Constructor. Pass the corresponding SConf instance.
source code
Message(self, text)
Inform about what we are doing right now, e.g. 'Checking for SOMETHING ... '
source code
Result(self, res)
Inform about the result of the test. res may be an integer or a string. In case of an integer, the written text will be 'yes' or 'no'. The result is only displayed when self.did_show_result is not set.
source code
TryBuild(self, *args, **kw) source code
TryAction(self, *args, **kw) source code
TryCompile(self, *args, **kw) source code
TryLink(self, *args, **kw) source code
TryRun(self, *args, **kw) source code
__getattr__(self, attr) source code
BuildProg(self, text, ext) source code
CompileProg(self, text, ext) source code
CompileSharedObject(self, text, ext) source code
RunProg(self, text, ext) source code
AppendLIBS(self, lib_name_list) source code
PrependLIBS(self, lib_name_list) source code
SetLIBS(self, val) source code
Display(self, msg) source code
Log(self, msg) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sconf)

source code 
Constructor. Pass the corresponding SConf instance.
Overrides: object.__init__