|
rad
5.1.0
|
Namespaces | |
| gtlogcap | |
Functions | |
| def | gtlogcap.gtlogcap_replace_gtmain (self) |
| Remove google test/mock main libraries and replace with gtlogcap main library. More... | |
| def | gtlogcap.gtlogcap_enable_globally (self) |
| Method that enables gtlogcap globally, if configured to. More... | |
| def | gtlogcap.gtlogcap_enable (conf) |
| Enables gtlogcap feature. More... | |
| def | gtlogcap.configure (conf) |
Variables | |
| gtlogcap.use | |
| gtlogcap.lib | |
Simple waf tool that overrides use of google test main() library with the gtlogcap library which provides a customized main() that captures LOG4CPLUS logs and prints them if a test fails.
Enable this on selected taskgens by adding the feature gtlogcap, or enable it for all test taskgens globally by invoking the configuration method gtlogcap_enable():
def configure(conf):
conf.load("gtlogcap")
To opt-out on individual taskgens, set the attribute gtlogcap_enable=False
bld(..., gtlogcap_enable=False)
Configuration
During configuration-phase:
gtlogcap tool: The tool to load is gtlogcap.
def configure(cnf):
...
gtlogcap_enable(): Enables "gtlogcap" feature on all taskgens with the "test" feature.
def configure(cnf):
...
GTLOGCAP_USELIB: Control the use-var name for library to link to, when gtlogcap is enabled. This also disables automatic loading of the default gtlogcap library using wdep-name rad.gtlogcap.
def configure(cnf):
cnf.check_cfg(package="mygtlogcap", uselib_store"mygtlogcap", args='--cflags --libs')
gtlogcap_enable attribute (default True): Allows explicit control when gtlogcap is globally enabled. To disable on individual taskgen:
def build(bld):
bld(..., gtlogcap_enable=False)