| Home | Trees | Index | Help |
|
|---|
| Package SCons :: Module SConf :: Class SConfBase |
|
This is simply a class to represent a configure context. After creating a SConf object, you can call any tests. After finished with your tests, be sure to call the Finish() method, which returns the modified environment. Some words about caching: In most cases, it is not necessary to cache Test results explicitely. Instead, we use the scons dependency checking mechanism. For example, if one wants to compile a test program (SConf.TryLink), the compiler is only called, if the program dependencies have changed. However, if the program could not be compiled in a former SConf run, we need to explicitely cache this error.
| Method Summary | |
|---|---|
Constructor. | |
Adds test_class to this SConf instance. | |
Adds all the tests given in the tests dictionary to this SConf instance | |
Tries to build the given nodes immediately. | |
Call this method after finished with your tests: env = sconf.Finish() | |
Wrapper function for handling piped spawns. | |
Tries to execute the given action with optional source file contents <text> and optional source file extension <extension>, Returns the status (0 : failed, 1 : ok) and the contents of the output file. | |
Low level TryBuild implementation. | |
Compiles the program given in text to an env.Object, using extension as file extension (e.g. | |
Compiles the program given in text to an executable env.Program, using extension as file extension (e.g. | |
Compiles and runs the program given in text, using extension as file extension (e.g. | |
| Class Variable Summary | |
|---|---|
classobj |
TestWrapper = SCons.SConf.TestWrapper |
| Method Details |
|---|
__init__(self,
env,
custom_tests={},
conf_dir='$CONFIGUREDIR',
log_file='$CONFIGURELOG',
config_h=None,
_depth=0)
|
AddTest(self, test_name, test_instance)Adds test_class to this SConf instance. It can be called with self.test_name(...) |
AddTests(self, tests)Adds all the tests given in the tests dictionary to this SConf instance |
BuildNodes(self, nodes)Tries to build the given nodes immediately. Returns 1 on success, 0 on error. |
Finish(self)Call this method after finished with your tests: env = sconf.Finish() |
pspawn_wrapper(self, sh, escape, cmd, args, env)Wrapper function for handling piped spawns. This looks to the calling interface (in Action.py) like a "normal" spawn, but associates the call with the PSPAWN variable from the construction environment and with the streams to which we want the output logged. This gets slid into the construction environment as the SPAWN variable so Action.py doesn't have to know or care whether it's spawning a piped command or not. |
TryAction(self, action, text=None, extension='')Tries to execute the given action with optional source file contents <text> and optional source file extension <extension>, Returns the status (0 : failed, 1 : ok) and the contents of the output file. |
TryBuild(self, builder, text=None, extension='')Low level TryBuild implementation. Normally you don't need to call that - you can use TryCompile / TryLink / TryRun instead |
TryCompile(self, text, extension)Compiles the program given in text to an env.Object, using extension as file extension (e.g. '.c'). Returns 1, if compilation was successful, 0 otherwise. The target is saved in self.lastTarget (for further processing). |
TryLink(self, text, extension)Compiles the program given in text to an executable env.Program, using extension as file extension (e.g. '.c'). Returns 1, if compilation was successful, 0 otherwise. The target is saved in self.lastTarget (for further processing). |
TryRun(self, text, extension)Compiles and runs the program given in text, using extension as file extension (e.g. '.c'). Returns (1, outputStr) on success, (0, '') otherwise. The target (a file containing the program's stdout) is saved in self.lastTarget (for further processing). |
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed Dec 12 09:39:31 2007 | http://epydoc.sf.net |