diff options
author | Joe Guo <joeg@catalyst.net.nz> | 2019-04-30 17:21:15 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-05-10 08:19:16 +0000 |
commit | 21475e9556e3088a99951abeea07cea500cce105 (patch) | |
tree | 57b097ecc965e31e4f7785984847b120cb0f635d /buildtools | |
parent | b78048524da871ea4425e7dc3b9d09e2e1c43c64 (diff) | |
download | samba-21475e9556e3088a99951abeea07cea500cce105.tar.gz |
wscript: mv --enable-coverage option to global
We want to enable gcov for all tasks, move it to global wscript.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/wscript | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index f1ebc1cea9e..2e14a326cb8 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -102,6 +102,10 @@ def options(opt): gr.add_option('--enable-developer', help=("Turn on developer warnings and debugging"), action="store_true", dest='developer', default=False) + opt.add_option('--enable-coverage', + help=("enable options necessary for code coverage " + "reporting on selftest (default=no)"), + action="store_true", dest='enable_coverage', default=False) def picky_developer_callback(option, opt_str, value, parser): parser.values.developer = True parser.values.picky_developer = True @@ -278,6 +282,13 @@ def configure(conf): except: conf.env.ABI_CHECK = False + conf.env.enable_coverage = Options.options.enable_coverage + if conf.env.enable_coverage: + conf.ADD_LDFLAGS('-lgcov', testflags=True) + conf.ADD_CFLAGS('--coverage', testflags=True) + # disable abi check for coverage, otherwise ld will fail + conf.env.ABI_CHECK = False + conf.env.GIT_LOCAL_CHANGES = Options.options.GIT_LOCAL_CHANGES conf.CHECK_UNAME() |