Hi -
As far as build documentation, I’m sorry to report that it is more or less lacking. We have plans to address that, but it won’t happen right away. For now, your best resource to get build system questions answered is probably to post here.
Regarding your coverage build: by “latest version” do you mean v4.4
(i.e. latest stable release), or the master
branch which is used for active development?
Meanwhile I just tested out your build command on the master
branch and it seems to work for me. I get .gcno
files, and after I run a binary I get .gcda
files as well.
The .gcno
files should exist in a lot more places than in sconf_temp
though: you should find .gcno
files for every object file under build/opt
(that directory may vary with build options, but is correct for the build command you have provided). After you run a binary, you should also find .gcda
files under built/opt
:
$ find build/opt -name "*.gcno" | wc -l
341
$ find build/opt -name "*.gcda" | wc -l
317
In the above case I built the target build/install/bin/wt
rather than install-mongod
since it is much faster to build than the whole mongod
binary. I then ran wt --help
to produce the .gcda
files. You might experiment a bit with that target to see if you can get it working before moving on to building install-mongod
. I think it will save you some time.
It might also be useful if you provided details on your OS, distro version, tooolchain, etc., if you still find it isn’t working.
A few other notes:
- You don’t need to add
-g
to the build, we do that for you, always.
- You may want to add
-ftest-coverage
to LINKFLAGS
as well. I don’t know if it makes a difference, and I didn’t happen to need to do so to get .gcda
files, but I think it is probably a good idea.
I hope this helps!
Thanks,
Andrew