add lcov support
This commit is contained in:
3
BUILD
3
BUILD
@@ -62,6 +62,9 @@ Example: scons opt
|
||||
and opt-static
|
||||
Example: scons all
|
||||
|
||||
- gcov: code coverage analysis. Build a debugging version of
|
||||
the code for code coverage analysis in 'build-dir/gcov'.
|
||||
|
||||
- dist: generate a release tarball and zipfile from the
|
||||
source tree. The tarball and zipfile name are generated
|
||||
according to the version number stored in the SConstruct
|
||||
|
||||
13
build.py
13
build.py
@@ -347,6 +347,19 @@ class Ns3:
|
||||
builders = self.gen_mod_dep (variant)
|
||||
for builder in builders:
|
||||
gcov_env.Alias ('gcov', builder)
|
||||
gcov_env.Alias ('lcov-report')
|
||||
if 'lcov-report' in COMMAND_LINE_TARGETS:
|
||||
lcov_report_dir = os.path.join (self.build_dir, 'lcov-report')
|
||||
create_dir_command = "rm -rf " + lcov_report_dir +
|
||||
" && mkdir " + lcov_report_dir + ";"
|
||||
gcov_env.Execute (create_dir_command)
|
||||
info_file = os.path.join (lcov_report_dir, 'ns3.info')
|
||||
lcov_command = "utils/lcov/lcov -c -d . -o " info_file
|
||||
gcov_env.Execute (lcov_command)
|
||||
genhtml_command = "utils/lcov/genhtml -o " + lcov_report_data +
|
||||
" " + info_file
|
||||
gcov_env.Execute (genhtml_command)
|
||||
|
||||
|
||||
|
||||
opt_env = env.Copy ()
|
||||
|
||||
3475
utils/lcov/genhtml
Executable file
3475
utils/lcov/genhtml
Executable file
File diff suppressed because it is too large
Load Diff
1719
utils/lcov/geninfo
Executable file
1719
utils/lcov/geninfo
Executable file
File diff suppressed because it is too large
Load Diff
2268
utils/lcov/lcov
Executable file
2268
utils/lcov/lcov
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user