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

Class 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.


Method Summary
  __init__(self, sconf)
Constructor.
  __getattr__(self, attr)
  AppendLIBS(self, lib_name_list)
  BuildProg(self, text, ext)
  CompileProg(self, text, ext)
  Display(self, msg)
  Log(self, msg)
  Message(self, text)
Inform about what we are doing right now, e.g.
  Result(self, res)
Inform about the result of the test.
  SetLIBS(self, val)
  TryAction(self, *args, **kw)
  TryBuild(self, *args, **kw)
  TryCompile(self, *args, **kw)
  TryLink(self, *args, **kw)
  TryRun(self, *args, **kw)

Method Details

__init__(self, sconf)
(Constructor)

Constructor. Pass the corresponding SConf instance.

Message(self, text)

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

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 'ok' or 'failed'. The result is only displayed when self.did_show_result is not set.


Generated by Epydoc 2.1 on Wed Dec 12 09:39:32 2007 http://epydoc.sf.net