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

Class CheckContext

source code

object --+
         |
        CheckContext

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.
source code
 
Message(self, text)
Inform about what we are doing right now, e.g.
source code
 
Result(self, res)
Inform about the result of the test.
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__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sconf)
(Constructor)

source code 
Constructor. Pass the corresponding SConf instance.

Overrides: object.__init__

Message(self, text)

source code 
Inform about what we are doing right now, e.g.
'Checking for SOMETHING ... '

Result(self, res)

source code 
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.