add lcov support

Mathieu Lacage 2006-10-03 10:20:55 +02:00
parent 3d64c8d0b6
commit c3a9fb96d2
5 changed files with 7478 additions and 0 deletions

3
BUILD
View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

1719
utils/lcov/geninfo Executable file

File diff suppressed because it is too large Load Diff

2268
utils/lcov/lcov Executable file

File diff suppressed because it is too large Load Diff