Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
cb076b7c
提交
cb076b7c
authored
5月 28, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update gyp and lcov deps
上级
22cc15a5
隐藏空白字符变更
内嵌
并排
正在显示
39 个修改的文件
包含
995 行增加
和
176 行删除
+995
-176
.travis.yml
worker/deps/gyp/.travis.yml
+17
-5
MSVSNew.py
worker/deps/gyp/pylib/gyp/MSVSNew.py
+7
-1
easy_xml.py
worker/deps/gyp/pylib/gyp/easy_xml.py
+7
-4
msvs.py
worker/deps/gyp/pylib/gyp/generator/msvs.py
+1
-1
ninja.py
worker/deps/gyp/pylib/gyp/generator/ninja.py
+1
-1
depfile.gyp
worker/deps/gyp/test/actions-depfile/depfile.gyp
+19
-2
gyptest-all.py
worker/deps/gyp/test/actions-depfile/gyptest-all.py
+13
-3
touch.py
worker/deps/gyp/test/actions-depfile/touch.py
+18
-0
CONTRIBUTING
worker/deps/lcov/CONTRIBUTING
+3
-2
Makefile
worker/deps/lcov/Makefile
+4
-0
README
worker/deps/lcov/README
+1
-1
copy_dates.sh
worker/deps/lcov/bin/copy_dates.sh
+1
-1
gendesc
worker/deps/lcov/bin/gendesc
+2
-1
genhtml
worker/deps/lcov/bin/genhtml
+82
-37
geninfo
worker/deps/lcov/bin/geninfo
+724
-90
genpng
worker/deps/lcov/bin/genpng
+2
-1
get_changes.sh
worker/deps/lcov/bin/get_changes.sh
+2
-2
get_version.sh
worker/deps/lcov/bin/get_version.sh
+2
-2
install.sh
worker/deps/lcov/bin/install.sh
+6
-2
lcov
worker/deps/lcov/bin/lcov
+3
-2
updateversion.pl
worker/deps/lcov/bin/updateversion.pl
+2
-1
lcovrc
worker/deps/lcov/lcovrc
+6
-0
gendesc.1
worker/deps/lcov/man/gendesc.1
+1
-1
genhtml.1
worker/deps/lcov/man/genhtml.1
+17
-1
geninfo.1
worker/deps/lcov/man/geninfo.1
+1
-1
genpng.1
worker/deps/lcov/man/genpng.1
+1
-1
lcov.1
worker/deps/lcov/man/lcov.1
+1
-1
lcovrc.5
worker/deps/lcov/man/lcovrc.5
+40
-1
lcov.spec
worker/deps/lcov/rpm/lcov.spec
+1
-1
mkinfo
worker/deps/lcov/test/bin/mkinfo
+1
-1
norminfo
worker/deps/lcov/test/bin/norminfo
+1
-1
test_run
worker/deps/lcov/test/bin/test_run
+1
-1
test_skip
worker/deps/lcov/test/bin/test_skip
+1
-1
testsuite_exit
worker/deps/lcov/test/bin/testsuite_exit
+1
-1
testsuite_init
worker/deps/lcov/test/bin/testsuite_init
+1
-1
genhtml_test
worker/deps/lcov/test/genhtml_output/genhtml_test
+1
-1
add_test
worker/deps/lcov/test/lcov_add_files/add_test
+1
-1
diff_test
worker/deps/lcov/test/lcov_diff/diff_test
+1
-1
check_counts
worker/deps/lcov/test/lcov_summary/check_counts
+1
-1
没有找到文件。
worker/deps/gyp/.travis.yml
浏览文件 @
cb076b7c
language
:
cpp
compiler
:
-
clang
matrix
:
include
:
-
os
:
linux
compiler
:
clang
-
os
:
osx
compiler
:
clang
-
python
:
2.7
language
:
python
before_install
:
pip install flake8
script
:
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
-
python
:
3.7
language
:
python
before_install
:
pip install flake8
script
:
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
dist
:
xenial
# required for Python >= 3.7 (travis-ci/travis-ci#9069)
before_install
:
./buildbot/travis-checkout.sh
script
:
./buildbot/travis-test.sh
os
:
-
linux
-
osx
branches
:
only
:
-
master
worker/deps/gyp/pylib/gyp/MSVSNew.py
浏览文件 @
cb076b7c
...
...
@@ -6,6 +6,7 @@
import
os
import
random
import
sys
import
gyp.common
...
...
@@ -56,8 +57,11 @@ def MakeGuid(name, seed='msvs_new'):
determine the GUID to refer to explicitly. It also means that the GUID will
not change when the project for a target is rebuilt.
"""
to_hash
=
str
(
seed
)
+
str
(
name
)
to_hash
=
to_hash
.
encode
(
'utf-8'
)
# Calculate a MD5 signature for the seed and name.
d
=
_new_md5
(
str
(
seed
)
+
str
(
name
)
)
.
hexdigest
()
.
upper
()
d
=
_new_md5
(
to_hash
)
.
hexdigest
()
.
upper
()
# Convert most of the signature to GUID form (discard the rest)
guid
=
(
'{'
+
d
[:
8
]
+
'-'
+
d
[
8
:
12
]
+
'-'
+
d
[
12
:
16
]
+
'-'
+
d
[
16
:
20
]
+
'-'
+
d
[
20
:
32
]
+
'}'
)
...
...
@@ -71,6 +75,8 @@ class MSVSSolutionEntry(object):
# Sort by name then guid (so things are in order on vs2008).
return
cmp
((
self
.
name
,
self
.
get_guid
()),
(
other
.
name
,
other
.
get_guid
()))
def
__lt__
(
self
,
other
):
return
(
self
.
name
,
self
.
get_guid
())
<
(
other
.
name
,
other
.
get_guid
())
class
MSVSFolder
(
MSVSSolutionEntry
):
"""Folder in a Visual Studio project or solution."""
...
...
worker/deps/gyp/pylib/gyp/easy_xml.py
浏览文件 @
cb076b7c
...
...
@@ -5,6 +5,7 @@
import
re
import
os
import
locale
import
sys
try
:
# reduce moved to functools in python3.
...
...
@@ -121,10 +122,12 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
xml_string
=
XmlToString
(
content
,
encoding
,
pretty
)
if
win32
and
os
.
linesep
!=
'
\r\n
'
:
xml_string
=
xml_string
.
replace
(
'
\n
'
,
'
\r\n
'
)
default_encoding
=
locale
.
getdefaultlocale
()[
1
]
if
default_encoding
and
default_encoding
.
upper
()
!=
encoding
.
upper
():
xml_string
=
xml_string
.
decode
(
default_encoding
)
.
encode
(
encoding
)
default_encoding
=
locale
.
getdefaultlocale
()[
1
]
if
default_encoding
and
default_encoding
.
upper
()
!=
encoding
.
upper
():
try
:
xml_string
=
xml_string
.
decode
(
default_encoding
)
.
encode
(
encoding
)
except
AttributeError
:
pass
# Get the old content
try
:
...
...
worker/deps/gyp/pylib/gyp/generator/msvs.py
浏览文件 @
cb076b7c
...
...
@@ -2712,7 +2712,7 @@ def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name):
platform_name
=
None
msvs_windows_sdk_version
=
None
for
configuration
in
spec
[
'configurations'
]
.
iter
values
():
for
configuration
in
spec
[
'configurations'
]
.
values
():
platform_name
=
platform_name
or
_ConfigPlatform
(
configuration
)
msvs_windows_sdk_version
=
(
msvs_windows_sdk_version
or
_ConfigWindowsTargetPlatformVersion
(
configuration
,
version
))
...
...
worker/deps/gyp/pylib/gyp/generator/ninja.py
浏览文件 @
cb076b7c
...
...
@@ -621,7 +621,7 @@ class NinjaWriter(object):
args
=
action
[
'action'
]
depfile
=
action
.
get
(
'depfile'
,
None
)
if
depfile
:
depfile
=
self
.
ExpandSpecial
(
depfile
,
self
.
base_to_build
)
depfile
=
self
.
ExpandSpecial
(
depfile
)
pool
=
'console'
if
int
(
action
.
get
(
'ninja_use_console'
,
0
))
else
None
rule_name
,
_
=
self
.
WriteNewNinjaRule
(
name
,
args
,
description
,
is_cygwin
,
env
,
pool
,
...
...
worker/deps/gyp/test/actions-depfile/depfile.gyp
浏览文件 @
cb076b7c
...
...
@@ -16,8 +16,25 @@
'outputs': [
'output.txt',
],
'depfile': 'depfile.d',
'action': [ ]
'depfile': 'depfile_action.d',
'action': [
'python', 'touch.py', '<(PRODUCT_DIR)/<(_depfile)',
],
'msvs_cygwin_shell': 0,
},
{
'action_name': 'depfile_action_intermediate_dir',
'inputs': [
'input.txt',
],
'outputs': [
'output-intermediate.txt',
],
'depfile': '<(INTERMEDIATE_DIR)/depfile_action_intermediate_dir.d',
'action': [
'python', 'touch.py', '<(_depfile)',
],
'msvs_cygwin_shell': 0,
},
],
},
...
...
worker/deps/gyp/test/actions-depfile/gyptest-all.py
浏览文件 @
cb076b7c
...
...
@@ -7,6 +7,7 @@
"""Verifies that depfile fields are output in ninja rules."""
import
TestGyp
import
os
test
=
TestGyp
.
TestGyp
()
...
...
@@ -14,7 +15,16 @@ if test.format == 'ninja':
test
.
run_gyp
(
'depfile.gyp'
)
contents
=
open
(
test
.
built_file_path
(
'obj/depfile_target.ninja'
))
.
read
()
expected
=
'depfile = depfile.d'
if
expected
not
in
contents
:
test
.
fail_test
()
expected
=
[
'depfile = depfile_action.d'
,
'depfile = '
+
os
.
path
.
join
(
'obj'
,
'depfile_target.gen/depfile_action_intermediate_dir.d'
),
]
test
.
must_contain_all_lines
(
contents
,
expected
)
test
.
build
(
'depfile.gyp'
)
test
.
built_file_must_exist
(
'depfile_action.d'
)
test
.
built_file_must_exist
(
'obj/depfile_target.gen/depfile_action_intermediate_dir.d'
)
test
.
pass_test
()
worker/deps/gyp/test/actions-depfile/touch.py
0 → 100644
浏览文件 @
cb076b7c
#!/usr/bin/env python
#
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import
os
import
sys
"""Cross-platform touch."""
for
fname
in
sys
.
argv
[
1
:]:
if
os
.
path
.
exists
(
fname
):
os
.
utime
(
fname
,
None
)
else
:
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
'.'
,
os
.
path
.
dirname
(
fname
))):
os
.
makedirs
(
os
.
path
.
dirname
(
fname
))
open
(
fname
,
'w'
)
.
close
()
worker/deps/lcov/CONTRIBUTING
浏览文件 @
cb076b7c
...
...
@@ -63,8 +63,9 @@ list [1].
Contribution format
===================
To contribute a change, please create a patch using the diff utility with the
following command line options:
To contribute a change, please create a patch using 'git format-patch'.
Alternatively you can use the diff utility with the following command line
options:
diff -Naurp
...
...
worker/deps/lcov/Makefile
浏览文件 @
cb076b7c
...
...
@@ -15,6 +15,10 @@ VERSION := $(shell bin/get_version.sh --version)
RELEASE
:=
$(
shell
bin/get_version.sh
--release
)
FULL
:=
$(
shell
bin/get_version.sh
--full
)
# Set this variable during 'make install' to specify the Perl interpreter used in
# installed scripts, or leave empty to keep the current interpreter.
export
LCOV_PERL_PATH
:=
/usr/bin/perl
PREFIX
:=
/usr/local
CFG_DIR
:=
$(PREFIX)
/etc
...
...
worker/deps/lcov/README
浏览文件 @
cb076b7c
-------------------------------------------------
- README file for the LTP GCOV extension (LCOV) -
- Last changes: 201
5-10-05
-
- Last changes: 201
6-12-19
-
-------------------------------------------------
Description
...
...
worker/deps/lcov/bin/copy_dates.sh
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Usage: copy_dates.sh SOURCE TARGET
#
...
...
worker/deps/lcov/bin/gendesc
浏览文件 @
cb076b7c
#!/usr/bin/
perl -w
#!/usr/bin/
env perl
#
# Copyright (c) International Business Machines Corp., 2002
#
...
...
@@ -36,6 +36,7 @@
#
use
strict
;
use
warnings
;
use
File::
Basename
;
use
Getopt::
Long
;
use
Cwd
qw/abs_path/
;
...
...
worker/deps/lcov/bin/genhtml
浏览文件 @
cb076b7c
#!/usr/bin/
perl -w
#!/usr/bin/
env perl
#
# Copyright (c) International Business Machines Corp., 2002,2012
#
...
...
@@ -65,6 +65,7 @@
#
use strict;
use warnings;
use File::Basename;
use File::Temp qw(tempfile);
use Getopt::Long;
...
...
@@ -154,6 +155,9 @@ our $BR_CLOSE = 5;
our
$
BR_SUB =
0;
our
$
BR_ADD =
1;
#
Block
value
used
for
unnamed
blocks
our
$
UNNAMED_BLOCK =
vec(pack('b*',
1
x
32
),
0
,
32
);
#
Error
classes
which
users
may
specify
to
ignore
during
processing
our
$
ERROR_SOURCE =
0;
our
%
ERROR_ID =
(
...
...
@@ -234,7 +238,7 @@ sub write_test_table_epilog(*);
sub write_source($$$$$$$);
sub write_source_prolog(*);
sub write_source_line(*$$$$$
$
);
sub write_source_line(*$$$$$);
sub write_source_epilog(*);
sub write_frameset(*$$$);
...
...
@@ -287,6 +291,7 @@ our @opt_ignore_errors; # Ignore certain error classes during processing
our @ignore;
our $opt_config_file; # User-specified configuration file location
our %opt_rc;
our $opt_missed; # List/sort lines by missed counts
our $charset = "UTF-8"; # Default charset for HTML pages
our @fileview_sortlist;
our @fileview_sortname = ("", "-sort-l", "-sort-f", "-sort-b");
...
...
@@ -374,6 +379,7 @@ if ($config || %opt_rc)
"genhtml_charset" => \$charset,
"genhtml_desc_html" => \$rc_desc_html,
"genhtml_demangle_cpp" => \$demangle_cpp,
"genhtml_missed" => \$opt_missed,
"lcov_function_coverage" => \$lcov_func_coverage,
"lcov_branch_coverage" => \$lcov_branch_coverage,
});
...
...
@@ -420,6 +426,7 @@ if (!GetOptions("output-directory|o=s" => \$output_directory,
"config-file=s" => \$opt_config_file,
"rc=s%" => \%opt_rc,
"precision=i" => \$default_precision,
"missed" => \$opt_missed,
))
{
print(STDERR "Use $tool_name --help to get usage information\n");
...
...
@@ -621,6 +628,7 @@ HTML output:
--
(
no-
)
sort
Enable
(
disable
)
sorted
coverage
views
--demangle-cpp
Demangle
C
++
function
names
--precision
NUM
Set
precision
of
coverage
rate
--missed
Show
miss
counts
as
negative
numbers
For
more
information
see:
$
lcov_url
END_OF_USAGE
...
...
@@ -1620,6 +1628,7 @@ sub read_info_file($)
($1, $2, $3, $4);
last if (!$br_coverage);
$block = -1 if ($block == $UNNAMED_BLOCK);
$sumbrcount->{$line} .=
"$block,$branch,$taken:";
...
...
@@ -2621,9 +2630,18 @@ sub get_date_string()
my $hour;
my $min;
my $sec;
my @timeresult;
if (defined $ENV{'SOURCE_DATE_EPOCH'})
{
@timeresult = gmtime($ENV{'SOURCE_DATE_EPOCH'});
}
else
{
@timeresult = localtime();
}
($year, $month, $day, $hour, $min, $sec) =
(localtime())
[5, 4, 3, 2, 1, 0];
@timeresult
[5, 4, 3, 2, 1, 0];
return sprintf("%d-%02d-%02d %02d:%02d:%02d", $year+1900, $month+1,
$day, $hour, $min, $sec);
...
...
@@ -3732,6 +3750,10 @@ END_OF_HTML
$class = $rate_name[classify_rate($found, $hit,
$med, $hi)];
}
if ($opt_missed) {
# Show negative number of items without coverage
$hit = -($found - $hit);
}
write_html($handle,
<
<
END_OF_HTML
);
<
td
class=
"coverPer$class"
>
$rate
</td>
<td
class=
"coverNum$class"
>
$hit / $found
</td>
...
...
@@ -4137,16 +4159,15 @@ sub format_count($$)
#
# write_source_line(filehandle, line_num, source, hit_count, converted,
# brdata
, add_anchor
)
# brdata)
#
# Write formatted source code line. Return a line in a format as needed
# by gen_png()
#
sub write_source_line(*$$$$$
$
)
sub write_source_line(*$$$$$)
{
my ($handle, $line, $source, $count, $converted, $brdata,
$add_anchor) = @_;
my ($handle, $line, $source, $count, $converted, $brdata) = @_;
my $source_format;
my $count_format;
my $result;
...
...
@@ -4183,11 +4204,8 @@ sub write_source_line(*$$$$$$)
# Write out a line number navigation anchor every $nav_resolution
# lines if necessary
if ($add_anchor)
{
$anchor_start = "
<a
name=
\"$_[1]\"
>
";
$anchor_end = "
</a>
";
}
$anchor_start = "
<a
name=
\"$_[1]\"
>
";
$anchor_end = "
</a>
";
# *************************************************************
...
...
@@ -4632,10 +4650,57 @@ END_OF_HTML
write_header_epilog
(*
HTML_HANDLE
,
$
base_dir
);
}
sub
get_sorted_by_rate
($$)
{
my
($
hash
,
$
type
)
=
@
_
;
if
($
type =
=
$
SORT_LINE
)
{
#
Sort
by
line
coverage
return
sort
({$
hash-
>
{$a}[7]
<
=
>
$hash->{$b}[7]} keys(%{$hash}));
} elsif ($type == $SORT_FUNC) {
# Sort by function coverage;
return sort({$hash->{$a}[8]
<
=
>
$hash->{$b}[8]} keys(%{$hash}));
} elsif ($type == $SORT_BRANCH) {
# Sort by br coverage;
return sort({$hash->{$a}[9]
<
=
>
$hash->{$b}[9]} keys(%{$hash}));
}
}
sub get_sorted_by_missed($$)
{
my ($hash, $type) = @_;
if ($type == $SORT_LINE) {
# Sort by number of instrumented lines without coverage
return sort(
{
($hash->{$b}[0] - $hash->{$b}[1])
<
=
>
($hash->{$a}[0] - $hash->{$a}[1])
} keys(%{$hash}));
} elsif ($type == $SORT_FUNC) {
# Sort by number of instrumented functions without coverage
return sort(
{
($hash->{$b}[2] - $hash->{$b}[3])
<
=
>
($hash->{$a}[2] - $hash->{$a}[3])
} keys(%{$hash}));
} elsif ($type == $SORT_BRANCH) {
# Sort by number of instrumented branches without coverage
return sort(
{
($hash->{$b}[4] - $hash->{$b}[5])
<
=
>
($hash->{$a}[4] - $hash->{$a}[5])
} keys(%{$hash}));
}
}
#
# get_sorted_keys(hash_ref, sort_type)
#
# hash_ref: filename -> stats
# stats: [ lines_found, lines_hit, fn_found, fn_hit, br_found, br_hit,
# link_name, line_rate, fn_rate, br_rate ]
#
sub get_sorted_keys($$)
{
...
...
@@ -4644,15 +4709,10 @@ sub get_sorted_keys($$)
if ($type == $SORT_FILE) {
# Sort by name
return sort(keys(%{$hash}));
}
elsif
($
type =
=
$
SORT_LINE
)
{
#
Sort
by
line
coverage
return
sort
({$
hash-
>
{$a}[7]
<
=
>
$hash->{$b}[7]} keys(%{$hash}));
} elsif ($type == $SORT_FUNC) {
# Sort by function coverage;
return sort({$hash->{$a}[8]
<
=
>
$hash->{$b}[8]} keys(%{$hash}));
} elsif ($type == $SORT_BRANCH) {
# Sort by br coverage;
return sort({$hash->{$a}[9]
<
=
>
$hash->{$b}[9]} keys(%{$hash}));
} elsif ($opt_missed) {
return get_sorted_by_missed($hash, $type);
} else {
return get_sorted_by_rate($hash, $type);
}
}
...
...
@@ -5067,7 +5127,6 @@ sub write_source($$$$$$$)
my $funcdata = $_[5];
my $sumbrcount = $_[6];
my $datafunc = get_hash_reverse($funcdata);
my $add_anchor;
my @file;
if ($_[2])
...
...
@@ -5118,25 +5177,11 @@ sub write_source($$$$$$$)
"$line_number\n");
}
$add_anchor = 0;
if ($frames) {
if (($line_number - 1) % $nav_resolution == 0) {
$add_anchor = 1;
}
}
if ($func_coverage) {
if ($line_number == 1) {
$add_anchor = 1;
} elsif (defined($datafunc->{$line_number +
$func_offset})) {
$add_anchor = 1;
}
}
push (@result,
write_source_line(HTML_HANDLE, $line_number,
$_, $count_data{$line_number},
$converted->{$line_number},
$sumbrcount->{$line_number}
, $add_anchor
));
$sumbrcount->{$line_number}));
}
close(SOURCE_HANDLE);
...
...
worker/deps/lcov/bin/geninfo
浏览文件 @
cb076b7c
#!/usr/bin/
perl -w
#!/usr/bin/
env perl
#
# Copyright (c) International Business Machines Corp., 2002,2012
#
...
...
@@ -50,12 +50,18 @@
#
use
strict
;
use
warnings
;
use
File::
Basename
;
use
File::Spec::
Functions
qw /abs2rel
catdir
file_name_is_absolute
splitdir
splitpath
catpath
/
;
use
File::
Temp
qw(tempfile tempdir)
;
use
File::
Copy
qw(copy)
;
use
Getopt::
Long
;
use
Digest::
MD5
qw(md5_base64)
;
use
Cwd
qw/abs_path/
;
use
PerlIO::
gzip
;
use
JSON
qw(decode_json)
;
if
(
$^O
eq
"msys"
)
{
require
File::Spec::
Win32
;
...
...
@@ -68,6 +74,7 @@ our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
our
$gcov_tool
=
"gcov"
;
our
$tool_name
=
basename
(
$0
);
our
$GCOV_VERSION_8_0_0
=
0x80000
;
our
$GCOV_VERSION_4_7_0
=
0x40700
;
our
$GCOV_VERSION_3_4_0
=
0x30400
;
our
$GCOV_VERSION_3_3_0
=
0x30300
;
...
...
@@ -161,13 +168,13 @@ sub solve_relative_path($$);
sub
read_gcov_header
($);
sub
read_gcov_file
($);
sub
info
(@);
sub
process_intermediate
($$$);
sub
map_llvm_version
($);
sub
version_to_str
($);
sub
get_gcov_version
();
sub
system_no_output
($@);
sub
read_config
($);
sub
apply_config
($);
sub
get_exclusion_data
($);
sub
apply_exclusion_data
($$);
sub
process_graphfile
($$);
sub
filter_fn_name
($);
...
...
@@ -182,7 +189,7 @@ sub sort_uniq(@);
sub
sort_uniq_lex
(@);
sub
graph_cleanup
($);
sub
graph_find_base
($);
sub
graph_from_bb
($$$);
sub
graph_from_bb
($$$
$
);
sub
graph_add_order
($$$);
sub
read_bb_word
(*
;
$
);
sub
read_bb_value
(*
;
$
);
...
...
@@ -262,6 +269,8 @@ our $gcno_split_crc;
our
$func_coverage
=
1
;
our
$br_coverage
=
0
;
our
$rc_auto_base
=
1
;
our
$rc_intermediate
=
"auto"
;
our
$intermediate
;
our
$excl_line
=
"LCOV_EXCL_LINE"
;
our
$excl_br_line
=
"LCOV_EXCL_BR_LINE"
;
...
...
@@ -329,6 +338,7 @@ if ($config || %opt_rc)
"geninfo_compat"
=>
\
$opt_compat
,
"geninfo_adjust_src_path"
=>
\
$rc_adjust_src_path
,
"geninfo_auto_base"
=>
\
$rc_auto_base
,
"geninfo_intermediate"
=>
\
$rc_intermediate
,
"lcov_function_coverage"
=>
\
$func_coverage
,
"lcov_branch_coverage"
=>
\
$br_coverage
,
"lcov_excl_line"
=>
\
$excl_line
,
...
...
@@ -458,16 +468,45 @@ if (system_no_output(3, $gcov_tool, "--help") == -1)
}
(
$gcov_version
,
$gcov_version_string
)
=
get_gcov_version
();
$gcov_caps
=
get_gcov_capabilities
();
# Determine intermediate mode
if
(
$rc_intermediate
eq
"0"
)
{
$intermediate
=
0
;
}
elsif
(
$rc_intermediate
eq
"1"
)
{
$intermediate
=
1
;
}
elsif
(
lc
(
$rc_intermediate
)
eq
"auto"
)
{
# Use intermediate format if supported by gcov
$intermediate
=
(
$gcov_caps
->
{
'intermediate-format'
}
||
$gcov_caps
->
{
'json-format'
})
?
1
:
0
;
}
else
{
die
(
"ERROR: invalid value for geninfo_intermediate: "
.
"'$rc_intermediate'\n"
);
}
if
(
$intermediate
)
{
info
(
"Using intermediate gcov format\n"
);
if
(
$opt_derive_func_data
)
{
warn
(
"WARNING: --derive-func-data is not compatible with "
.
"intermediate format - ignoring\n"
);
$opt_derive_func_data
=
0
;
}
}
# Determine gcov options
$gcov_caps
=
get_gcov_capabilities
();
push
(
@gcov_options
,
"-b"
)
if
(
$gcov_caps
->
{
'branch-probabilities'
}
&&
(
$br_coverage
||
$func_coverage
));
push
(
@gcov_options
,
"-c"
)
if
(
$gcov_caps
->
{
'branch-counts'
}
&&
$br_coverage
);
push
(
@gcov_options
,
"-a"
)
if
(
$gcov_caps
->
{
'all-blocks'
}
&&
$opt_gcov_all_blocks
&&
$br_coverage
);
push
(
@gcov_options
,
"-p"
)
if
(
$gcov_caps
->
{
'preserve-paths'
});
$opt_gcov_all_blocks
&&
$br_coverage
&&
!
$intermediate
);
if
(
$gcov_caps
->
{
'hash-filenames'
})
{
push
(
@gcov_options
,
"-x"
);
}
else
{
push
(
@gcov_options
,
"-p"
)
if
(
$gcov_caps
->
{
'preserve-paths'
});
}
# Determine compatibility modes
parse_compat_modes
(
$opt_compat
);
...
...
@@ -592,7 +631,7 @@ foreach my $entry (@data_directory) {
gen_info
(
$entry
);
}
if
(
$initial
&&
$br_coverage
)
{
if
(
$initial
&&
$br_coverage
&&
!
$intermediate
)
{
warn
(
"Note: --initial does not generate branch coverage "
.
"data\n"
);
}
...
...
@@ -761,6 +800,7 @@ sub gen_info($)
my
$prefix
;
my
$type
;
my
$ext
;
my
$tempdir
;
if
(
$initial
)
{
$type
=
"graph"
;
...
...
@@ -791,16 +831,22 @@ sub gen_info($)
$prefix
=
""
;
}
$tempdir
=
tempdir
(
CLEANUP
=>
1
);
# Process all files in list
foreach
$file
(
@file_list
)
{
# Process file
if
(
$initial
)
{
if
(
$intermediate
)
{
process_intermediate
(
$file
,
$prefix
,
$tempdir
);
}
elsif
(
$initial
)
{
process_graphfile
(
$file
,
$prefix
);
}
else
{
process_dafile
(
$file
,
$prefix
);
}
}
unlink
(
$tempdir
);
# Report whether files were excluded.
if
(
%
excluded_files
)
{
info
(
"Excluded data for %d files due to include/exclude options\n"
,
...
...
@@ -1051,10 +1097,12 @@ sub process_dafile($$)
# Try to find base directory automatically if requested by user
if
(
$rc_auto_base
)
{
$base_dir
=
find_base_from_graph
(
$base_dir
,
$instr
,
$graph
);
$base_dir
=
find_base_from_source
(
$base_dir
,
[
keys
(
%
{
$instr
}),
keys
(
%
{
$graph
})
]);
}
(
$instr
,
$graph
)
=
adjust_graph_filenames
(
$base_dir
,
$instr
,
$graph
);
adjust_source_filenames
(
$instr
,
$base_dir
);
adjust_source_filenames
(
$graph
,
$base_dir
);
# Set $object_dir to real location of object files. This may differ
# from $da_dir if the graph file is just a link to the "real" object
...
...
@@ -1483,7 +1531,9 @@ sub solve_relative_path($$)
$result
=~
s/\/\//\//g
;
# Remove .
$result
=~
s/\/\.\//\//g
;
while
(
$result
=~
s/\/\.\//\//g
)
{
}
$result
=~
s/\/\.$/\//g
;
# Remove trailing /
...
...
@@ -1900,7 +1950,7 @@ sub read_gcov_file($)
# Also remove CR from line-end
s/\015$//
;
if
(
/^\s*(\d+|\$+):\s*(\d+)-block\s+(\d+)\s*$/
)
{
if
(
/^\s*(\d+|\$+
|\%+
):\s*(\d+)-block\s+(\d+)\s*$/
)
{
# Block information - used to group related
# branches
$last_line
=
$2
;
...
...
@@ -1934,6 +1984,9 @@ sub read_gcov_file($)
{
my
(
$count
,
$line
,
$code
)
=
(
$1
,
$2
,
$3
);
# Skip instance-specific counts
next
if
(
$line
<=
(
scalar
(
@result
)
/
3
));
$last_line
=
$line
;
$last_block
=
$UNNAMED_BLOCK
;
# Check for exclusion markers
...
...
@@ -1963,6 +2016,9 @@ sub read_gcov_file($)
}
}
# Strip unexecuted basic block marker
$count
=~
s/\*$//
;
# <exec count>:<line number>:<source code>
if
(
$line
eq
"0"
)
{
...
...
@@ -2002,6 +2058,453 @@ sub read_gcov_file($)
}
#
# read_intermediate_text(gcov_filename, data)
#
# Read gcov intermediate text format in GCOV_FILENAME and add the resulting
# data to DATA in the following format:
#
# data: source_filename -> file_data
# file_data: concatenated lines of intermediate text data
#
sub
read_intermediate_text
($$)
{
my
(
$gcov_filename
,
$data
)
=
@_
;
my
$fd
;
my
$filename
;
open
(
$fd
,
"<"
,
$gcov_filename
)
or
die
(
"ERROR: Could not read $gcov_filename: $!\n"
);
while
(
my
$line
=
<
$fd
>
)
{
if
(
$line
=~
/^file:(.*)$/
)
{
$filename
=
$1
;
chomp
(
$filename
);
}
elsif
(
defined
(
$filename
))
{
$data
->
{
$filename
}
.=
$line
;
}
}
close
(
$fd
);
}
#
# read_intermediate_json(gcov_filename, data, basedir_ref)
#
# Read gcov intermediate JSON format in GCOV_FILENAME and add the resulting
# data to DATA in the following format:
#
# data: source_filename -> file_data
# file_data: GCOV JSON data for file
#
# Also store the value for current_working_directory to BASEDIR_REF.
#
sub
read_intermediate_json
($$$)
{
my
(
$gcov_filename
,
$data
,
$basedir_ref
)
=
@_
;
my
$fd
;
my
$text
;
my
$json
;
open
(
$fd
,
"<:gzip"
,
$gcov_filename
)
or
die
(
"ERROR: Could not read $gcov_filename: $!\n"
);
local
$/
;
$text
=
<
$fd
>
;
close
(
$fd
);
$json
=
decode_json
(
$text
);
if
(
!
defined
(
$json
)
||
!
exists
(
$json
->
{
"files"
})
||
ref
(
$json
->
{
"files"
}
ne
"ARRAY"
))
{
die
(
"ERROR: Unrecognized JSON output format in "
.
"$gcov_filename\n"
);
}
$$basedir_ref
=
$json
->
{
"current_working_directory"
};
for
my
$file
(
@
{
$json
->
{
"files"
}})
{
my
$filename
=
$file
->
{
"file"
};
$data
->
{
$filename
}
=
$file
;
}
}
#
# intermediate_text_to_info(fd, data, srcdata)
#
# Write DATA in info format to file descriptor FD.
#
# data: filename -> file_data:
# file_data: concatenated lines of intermediate text data
#
# srcdata: filename -> [ excl, brexcl, checksums ]
# excl: lineno -> 1 for all lines for which to exclude all data
# brexcl: lineno -> 1 for all lines for which to exclude branch data
# checksums: lineno -> source code checksum
#
# Note: To simplify processing, gcov data is not combined here, that is counts
# that appear multiple times for the same lines/branches are not added.
# This is done by lcov/genhtml when reading the data files.
#
sub
intermediate_text_to_info
($$$)
{
my
(
$fd
,
$data
,
$srcdata
)
=
@_
;
my
$branch_num
=
0
;
my
$c
;
return
if
(
!%
{
$data
});
print
(
$fd
"TN:$test_name\n"
);
for
my
$filename
(
keys
(
%
{
$data
}))
{
my
(
$excl
,
$brexcl
,
$checksums
);
if
(
defined
(
$srcdata
->
{
$filename
}))
{
(
$excl
,
$brexcl
,
$checksums
)
=
@
{
$srcdata
->
{
$filename
}};
}
print
(
$fd
"SF:$filename\n"
);
for
my
$line
(
split
(
/\n/
,
$data
->
{
$filename
}))
{
if
(
$line
=~
/^lcount:(\d+),(\d+),?/
)
{
# lcount:<line>,<count>
# lcount:<line>,<count>,<has_unexecuted_blocks>
if
(
$checksum
&&
exists
(
$checksums
->
{
$1
}))
{
$c
=
","
.
$checksums
->
{
$1
};
}
else
{
$c
=
""
;
}
print
(
$fd
"DA:$1,$2$c\n"
)
if
(
!
$excl
->
{
$1
});
# Intermediate text format does not provide
# branch numbers, and the same branch may appear
# multiple times on the same line (e.g. in
# template instances). Synthesize a branch
# number based on the assumptions:
# a) the order of branches is fixed across
# instances
# b) an instance starts with an lcount line
$branch_num
=
0
;
}
elsif
(
$line
=~
/^function:(\d+),(\d+),([^,]+)$/
)
{
next
if
(
!
$func_coverage
||
$excl
->
{
$1
});
# function:<line>,<count>,<name>
print
(
$fd
"FN:$1,$3\n"
);
print
(
$fd
"FNDA:$2,$3\n"
);
}
elsif
(
$line
=~
/^function:(\d+),\d+,(\d+),([^,]+)$/
)
{
next
if
(
!
$func_coverage
||
$excl
->
{
$1
});
# function:<start_line>,<end_line>,<count>,
# <name>
print
(
$fd
"FN:$1,$3\n"
);
print
(
$fd
"FNDA:$2,$3\n"
);
}
elsif
(
$line
=~
/^branch:(\d+),(taken|nottaken|notexec)/
)
{
next
if
(
!
$br_coverage
||
$excl
->
{
$1
}
||
$brexcl
->
{
$1
});
# branch:<line>,taken|nottaken|notexec
if
(
$2
eq
"taken"
)
{
$c
=
1
;
}
elsif
(
$2
eq
"nottaken"
)
{
$c
=
0
;
}
else
{
$c
=
"-"
;
}
print
(
$fd
"BRDA:$1,0,$branch_num,$c\n"
);
$branch_num
++
;
}
}
print
(
$fd
"end_of_record\n"
);
}
}
#
# intermediate_json_to_info(fd, data, srcdata)
#
# Write DATA in info format to file descriptor FD.
#
# data: filename -> file_data:
# file_data: GCOV JSON data for file
#
# srcdata: filename -> [ excl, brexcl, checksums ]
# excl: lineno -> 1 for all lines for which to exclude all data
# brexcl: lineno -> 1 for all lines for which to exclude branch data
# checksums: lineno -> source code checksum
#
# Note: To simplify processing, gcov data is not combined here, that is counts
# that appear multiple times for the same lines/branches are not added.
# This is done by lcov/genhtml when reading the data files.
#
sub
intermediate_json_to_info
($$$)
{
my
(
$fd
,
$data
,
$srcdata
)
=
@_
;
my
$branch_num
=
0
;
return
if
(
!%
{
$data
});
print
(
$fd
"TN:$test_name\n"
);
for
my
$filename
(
keys
(
%
{
$data
}))
{
my
(
$excl
,
$brexcl
,
$checksums
);
my
$file_data
=
$data
->
{
$filename
};
if
(
defined
(
$srcdata
->
{
$filename
}))
{
(
$excl
,
$brexcl
,
$checksums
)
=
@
{
$srcdata
->
{
$filename
}};
}
print
(
$fd
"SF:$filename\n"
);
# Function data
if
(
$func_coverage
)
{
for
my
$d
(
@
{
$file_data
->
{
"functions"
}})
{
my
$line
=
$d
->
{
"start_line"
};
my
$count
=
$d
->
{
"execution_count"
};
my
$name
=
$d
->
{
"name"
};
next
if
(
!
defined
(
$line
)
||
!
defined
(
$count
)
||
!
defined
(
$name
)
||
$excl
->
{
$line
});
print
(
$fd
"FN:$line,$name\n"
);
print
(
$fd
"FNDA:$count,$name\n"
);
}
}
# Line data
for
my
$d
(
@
{
$file_data
->
{
"lines"
}})
{
my
$line
=
$d
->
{
"line_number"
};
my
$count
=
$d
->
{
"count"
};
my
$c
;
my
$branches
=
$d
->
{
"branches"
};
my
$unexec
=
$d
->
{
"unexecuted_block"
};
next
if
(
!
defined
(
$line
)
||
!
defined
(
$count
)
||
$excl
->
{
$line
});
if
(
defined
(
$unexec
)
&&
$unexec
&&
$count
==
0
)
{
$unexec
=
1
;
}
else
{
$unexec
=
0
;
}
if
(
$checksum
&&
exists
(
$checksums
->
{
$line
}))
{
$c
=
","
.
$checksums
->
{
$line
};
}
else
{
$c
=
""
;
}
print
(
$fd
"DA:$line,$count$c\n"
);
$branch_num
=
0
;
# Branch data
if
(
$br_coverage
&&
!
$brexcl
->
{
$line
})
{
for
my
$b
(
@$branches
)
{
my
$brcount
=
$b
->
{
"count"
};
if
(
!
defined
(
$brcount
)
||
$unexec
)
{
$brcount
=
"-"
;
}
print
(
$fd
"BRDA:$line,0,$branch_num,"
.
"$brcount\n"
);
$branch_num
++
;
}
}
}
print
(
$fd
"end_of_record\n"
);
}
}
sub
get_output_fd
($$)
{
my
(
$outfile
,
$file
)
=
@_
;
my
$fd
;
if
(
!
defined
(
$outfile
))
{
open
(
$fd
,
">"
,
"$file.info"
)
or
die
(
"ERROR: Cannot create file $file.info: $!\n"
);
}
elsif
(
$outfile
eq
"-"
)
{
open
(
$fd
,
">&STDOUT"
)
or
die
(
"ERROR: Cannot duplicate stdout: $!\n"
);
}
else
{
open
(
$fd
,
">>"
,
$outfile
)
or
die
(
"ERROR: Cannot write to file $outfile: $!\n"
);
}
return
$fd
;
}
#
# print_gcov_warnings(stderr_file, is_graph, map)
#
# Print GCOV warnings in file STDERR_FILE to STDERR. If IS_GRAPH is non-zero,
# suppress warnings about missing as these are expected. Replace keys found
# in MAP with their values.
#
sub
print_gcov_warnings
($$$)
{
my
(
$stderr_file
,
$is_graph
,
$map
)
=
@_
;
my
$fd
;
if
(
!
open
(
$fd
,
"<"
,
$stderr_file
))
{
warn
(
"WARNING: Could not open GCOV stderr file "
.
"$stderr_file: $!\n"
);
return
;
}
while
(
my
$line
=
<
$fd
>
)
{
next
if
(
$is_graph
&&
$line
=~
/cannot open data file/
);
for
my
$key
(
keys
(
%
{
$map
}))
{
$line
=~
s/\Q$key\E/$map->{$key}/g
;
}
print
(
STDERR
$line
);
}
close
(
$fd
);
}
#
# process_intermediate(file, dir, tempdir)
#
# Create output for a single file (either a data file or a graph file) using
# gcov's intermediate option.
#
sub
process_intermediate
($$$)
{
my
(
$file
,
$dir
,
$tempdir
)
=
@_
;
my
(
$fdir
,
$fbase
,
$fext
);
my
$data_file
;
my
$errmsg
;
my
%
data
;
my
$fd
;
my
$base
;
my
$srcdata
;
my
$is_graph
=
0
;
my
(
$out
,
$err
,
$rc
);
my
$json_basedir
;
my
$json_format
;
info
(
"Processing %s\n"
,
abs2rel
(
$file
,
$dir
));
$file
=
solve_relative_path
(
$cwd
,
$file
);
(
$fdir
,
$fbase
,
$fext
)
=
split_filename
(
$file
);
$is_graph
=
1
if
(
".$fext"
eq
$graph_file_extension
);
if
(
$is_graph
)
{
# Process graph file - copy to temp directory to prevent
# accidental processing of associated data file
$data_file
=
"$tempdir/$fbase$graph_file_extension"
;
if
(
!
copy
(
$file
,
$data_file
))
{
$errmsg
=
"ERROR: Could not copy file $file"
;
goto
err
;
}
}
else
{
# Process data file in place
$data_file
=
$file
;
}
# Change directory
if
(
!
chdir
(
$tempdir
))
{
$errmsg
=
"Could not change to directory $tempdir: $!"
;
goto
err
;
}
# Run gcov on data file
(
$out
,
$err
,
$rc
)
=
system_no_output
(
1
+
2
+
4
,
$gcov_tool
,
$data_file
,
@gcov_options
,
"-i"
);
defined
(
$out
)
&&
unlink
(
$out
);
if
(
defined
(
$err
))
{
print_gcov_warnings
(
$err
,
$is_graph
,
{
$data_file
=>
$file
,
});
unlink
(
$err
);
}
if
(
$rc
)
{
$errmsg
=
"GCOV failed for $file"
;
goto
err
;
}
if
(
$is_graph
)
{
# Remove graph file copy
unlink
(
$data_file
);
}
# Parse resulting file(s)
for
my
$gcov_filename
(
glob
(
"*.gcov"
))
{
read_intermediate_text
(
$gcov_filename
,
\%
data
);
unlink
(
$gcov_filename
);
}
for
my
$gcov_filename
(
glob
(
"*.gcov.json.gz"
))
{
read_intermediate_json
(
$gcov_filename
,
\%
data
,
\
$json_basedir
);
unlink
(
$gcov_filename
);
$json_format
=
1
;
}
if
(
!%
data
)
{
warn
(
"WARNING: GCOV did not produce any data for $file\n"
);
return
;
}
# Determine base directory
if
(
defined
(
$base_directory
))
{
$base
=
$base_directory
;
}
elsif
(
defined
(
$json_basedir
))
{
$base
=
$json_basedir
;
}
else
{
$base
=
$fdir
;
if
(
is_compat
(
$COMPAT_MODE_LIBTOOL
))
{
# Avoid files from .libs dirs
$base
=~
s/\.libs$//
;
}
# Try to find base directory automatically if requested by user
if
(
$rc_auto_base
)
{
$base
=
find_base_from_source
(
$base
,
[
keys
(
%
data
)
]);
}
}
# Apply base file name to relative source files
adjust_source_filenames
(
\%
data
,
$base
);
# Remove excluded source files
filter_source_files
(
\%
data
);
# Get data on exclusion markers and checksums if requested
if
(
!
$no_markers
||
$checksum
)
{
$srcdata
=
get_all_source_data
(
keys
(
%
data
));
}
# Generate output
$fd
=
get_output_fd
(
$output_filename
,
$file
);
if
(
$json_format
)
{
intermediate_json_to_info
(
$fd
,
\%
data
,
$srcdata
);
}
else
{
intermediate_text_to_info
(
$fd
,
\%
data
,
$srcdata
);
}
close
(
$fd
);
chdir
(
$cwd
);
return
;
err:
if
(
$ignore
[
$ERROR_GCOV
])
{
warn
(
"WARNING: $errmsg!\n"
);
}
else
{
die
(
"ERROR: $errmsg!\n"
)
}
}
# Map LLVM versions to the version of GCC gcov which they emulate.
sub
map_llvm_version
($)
...
...
@@ -2136,8 +2639,12 @@ sub int_handler()
#
# MODE & 1: suppress STDOUT
# MODE & 2: suppress STDERR
# MODE & 4: redirect to temporary files instead of suppressing
#
# Return 0 on success, non-zero otherwise.
# Return (stdout, stderr, rc):
# stdout: path to tempfile containing stdout or undef
# stderr: path to tempfile containing stderr or undef
# 0 on success, non-zero otherwise
#
sub
system_no_output
($@)
...
...
@@ -2146,14 +2653,31 @@ sub system_no_output($@)
my
$result
;
local
*
OLD_STDERR
;
local
*
OLD_STDOUT
;
my
$stdout_file
;
my
$stderr_file
;
my
$fd
;
# Save old stdout and stderr handles
(
$mode
&
1
)
&&
open
(
OLD_STDOUT
,
">>&"
,
"STDOUT"
);
(
$mode
&
2
)
&&
open
(
OLD_STDERR
,
">>&"
,
"STDERR"
);
# Redirect to /dev/null
(
$mode
&
1
)
&&
open
(
STDOUT
,
">"
,
"/dev/null"
);
(
$mode
&
2
)
&&
open
(
STDERR
,
">"
,
"/dev/null"
);
if
(
$mode
&
4
)
{
# Redirect to temporary files
if
(
$mode
&
1
)
{
(
$fd
,
$stdout_file
)
=
tempfile
(
UNLINK
=>
1
);
open
(
STDOUT
,
">"
,
$stdout_file
)
||
warn
(
"$!\n"
);
close
(
$fd
);
}
if
(
$mode
&
2
)
{
(
$fd
,
$stderr_file
)
=
tempfile
(
UNLINK
=>
1
);
open
(
STDERR
,
">"
,
$stderr_file
)
||
warn
(
"$!\n"
);
close
(
$fd
);
}
}
else
{
# Redirect to /dev/null
(
$mode
&
1
)
&&
open
(
STDOUT
,
">"
,
"/dev/null"
);
(
$mode
&
2
)
&&
open
(
STDERR
,
">"
,
"/dev/null"
);
}
debug
(
"system("
.
join
(
' '
,
@_
)
.
")\n"
);
system
(
@_
);
...
...
@@ -2166,8 +2690,18 @@ sub system_no_output($@)
# Restore old handles
(
$mode
&
1
)
&&
open
(
STDOUT
,
">>&"
,
"OLD_STDOUT"
);
(
$mode
&
2
)
&&
open
(
STDERR
,
">>&"
,
"OLD_STDERR"
);
# Remove empty output files
if
(
defined
(
$stdout_file
)
&&
-
z
$stdout_file
)
{
unlink
(
$stdout_file
);
$stdout_file
=
undef
;
}
if
(
defined
(
$stderr_file
)
&&
-
z
$stderr_file
)
{
unlink
(
$stderr_file
);
$stderr_file
=
undef
;
}
return
$result
;
return
(
$stdout_file
,
$stderr_file
,
$result
)
;
}
...
...
@@ -2245,23 +2779,28 @@ sub apply_config($)
#
# get_
exclusion
_data(filename)
# get_
source
_data(filename)
#
# Scan specified source code file for exclusion markers and return
# linenumber -> 1
# for all lines which should be excluded.
# Scan specified source code file for exclusion markers and checksums. Return
# ( excl, brexcl, checksums ) where
# excl: lineno -> 1 for all lines for which to exclude all data
# brexcl: lineno -> 1 for all lines for which to exclude branch data
# checksums: lineno -> source code checksum
#
sub
get_
exclusion
_data
($)
sub
get_
source
_data
($)
{
my
(
$filename
)
=
@_
;
my
%
list
;
my
$flag
=
0
;
my
%
brdata
;
my
$brflag
=
0
;
my
%
checksums
;
local
*
HANDLE
;
if
(
!
open
(
HANDLE
,
"<"
,
$filename
))
{
warn
(
"WARNING: could not open $filename\n"
);
return
undef
;
return
;
}
while
(
<
HANDLE
>
)
{
if
(
/$EXCL_STOP/
)
{
...
...
@@ -2272,14 +2811,62 @@ sub get_exclusion_data($)
if
(
/$excl_line/
||
$flag
)
{
$list
{
$.
}
=
1
;
}
if
(
/$EXCL_BR_STOP/
)
{
$brflag
=
0
;
}
elsif
(
/$EXCL_BR_START/
)
{
$brflag
=
1
;
}
if
(
/$excl_br_line/
||
$brflag
)
{
$brdata
{
$.
}
=
1
;
}
if
(
$checksum
)
{
chomp
();
$checksums
{
$.
}
=
md5_base64
(
$_
);
}
}
close
(
HANDLE
);
if
(
$flag
)
{
if
(
$flag
||
$brflag
)
{
warn
(
"WARNING: unterminated exclusion section in $filename\n"
);
}
return
\%
list
;
return
(
\%
list
,
\%
brdata
,
\%
checksums
);
}
#
# get_all_source_data(filenames)
#
# Scan specified source code files for exclusion markers and return
# filename -> [ excl, brexcl, checksums ]
# excl: lineno -> 1 for all lines for which to exclude all data
# brexcl: lineno -> 1 for all lines for which to exclude branch data
# checksums: lineno -> source code checksum
#
sub
get_all_source_data
(@)
{
my
@filenames
=
@_
;
my
%
data
;
my
$failed
=
0
;
for
my
$filename
(
@filenames
)
{
my
@d
;
next
if
(
exists
(
$data
{
$filename
}));
@d
=
get_source_data
(
$filename
);
if
(
@d
)
{
$data
{
$filename
}
=
[
@d
];
}
else
{
$failed
=
1
;
}
}
if
(
$failed
)
{
warn
(
"WARNING: some exclusion markers may be ignored\n"
);
}
return
\%
data
;
}
...
...
@@ -2303,35 +2890,17 @@ sub apply_exclusion_data($$)
{
my
(
$instr
,
$graph
)
=
@_
;
my
$filename
;
my
%
excl_data
;
my
$excl_read_failed
=
0
;
# Collect exclusion marker data
foreach
$filename
(
sort_uniq_lex
(
keys
(
%
{
$graph
}),
keys
(
%
{
$instr
})))
{
my
$excl
=
get_exclusion_data
(
$filename
);
# Skip and note if file could not be read
if
(
!
defined
(
$excl
))
{
$excl_read_failed
=
1
;
next
;
}
# Add to collection if there are markers
$excl_data
{
$filename
}
=
$excl
if
(
keys
(
%
{
$excl
})
>
0
);
}
my
$excl_data
;
# Warn if not all source files could be read
if
(
$excl_read_failed
)
{
warn
(
"WARNING: some exclusion markers may be ignored\n"
);
}
(
$excl_data
)
=
get_all_source_data
(
keys
(
%
{
$graph
}),
keys
(
%
{
$instr
}));
# Skip if no markers were found
return
(
$instr
,
$graph
)
if
(
keys
(
%
excl_data
)
==
0
);
return
(
$instr
,
$graph
)
if
(
!%
$excl_data
);
# Apply exclusion marker data to graph
foreach
$filename
(
keys
(
%
excl_data
))
{
foreach
$filename
(
keys
(
%
$
excl_data
))
{
my
$function_data
=
$graph
->
{
$filename
};
my
$excl
=
$excl_data
{
$filename
}
;
my
$excl
=
$excl_data
->
{
$filename
}
->
[
0
]
;
my
$function
;
next
if
(
!
defined
(
$function_data
));
...
...
@@ -2369,9 +2938,9 @@ sub apply_exclusion_data($$)
}
# Apply exclusion marker data to instr
foreach
$filename
(
keys
(
%
excl_data
))
{
foreach
$filename
(
keys
(
%
$
excl_data
))
{
my
$line_data
=
$instr
->
{
$filename
};
my
$excl
=
$excl_data
{
$filename
}
;
my
$excl
=
$excl_data
->
{
$filename
}
->
[
0
]
;
my
$line
;
my
@new_data
;
...
...
@@ -2453,10 +3022,12 @@ sub process_graphfile($$)
# Try to find base directory automatically if requested by user
if
(
$rc_auto_base
)
{
$base_dir
=
find_base_from_graph
(
$base_dir
,
$instr
,
$graph
);
$base_dir
=
find_base_from_source
(
$base_dir
,
[
keys
(
%
{
$instr
}),
keys
(
%
{
$graph
})
]);
}
(
$instr
,
$graph
)
=
adjust_graph_filenames
(
$base_dir
,
$instr
,
$graph
);
adjust_source_filenames
(
$instr
,
$base_dir
);
adjust_source_filenames
(
$graph
,
$base_dir
);
if
(
!
$no_markers
)
{
# Apply exclusion marker data to graph file data
...
...
@@ -2752,11 +3323,11 @@ sub parent_dir($)
}
#
# find_base_from_
graph(base_dir, instr, graph
)
# find_base_from_
source(base_dir, source_files
)
#
# Try to determine the base directory of the
graph file specified by INSTR
#
and GRAPH
. The base directory is the base for all relative filenames in
# the g
raph file
. It is defined by the current working directory at time
# Try to determine the base directory of the
object file built from
#
SOURCE_FILES
. The base directory is the base for all relative filenames in
# the g
cov data
. It is defined by the current working directory at time
# of compiling the source file.
#
# This function implements a heuristic which relies on the following
...
...
@@ -2766,16 +3337,16 @@ sub parent_dir($)
# - files by the same name are not present in multiple parent directories
#
sub
find_base_from_
graph
($
$$)
sub
find_base_from_
source
(
$$)
{
my
(
$base_dir
,
$
instr
,
$graph
)
=
@_
;
my
(
$base_dir
,
$
source_files
)
=
@_
;
my
$old_base
;
my
$best_miss
;
my
$best_base
;
my
%
rel_files
;
# Determine list of relative paths
foreach
my
$filename
(
keys
(
%
{
$instr
}),
keys
(
%
{
$graph
})
)
{
foreach
my
$filename
(
@$source_files
)
{
next
if
(
file_name_is_absolute
(
$filename
));
$rel_files
{
$filename
}
=
1
;
...
...
@@ -2814,17 +3385,17 @@ sub find_base_from_graph($$$)
}
#
# adjust_
graph_filenames(base_dir, instr, graph
)
# adjust_
source_filenames(hash, base_dir
)
#
#
Make relative paths in INSTR and GRAPH absolute and apply
#
geninfo_adjust_src_path setting to graph file data
.
#
Transform all keys of HASH to absolute form and apply requested
#
transformations
.
#
sub
adjust_
graph
_filenames
($$$)
sub
adjust_
source
_filenames
($$$)
{
my
(
$
base_dir
,
$instr
,
$graph
)
=
@_
;
my
(
$
hash
,
$base_dir
)
=
@_
;
foreach
my
$filename
(
keys
(
%
{
$
instr
}))
{
foreach
my
$filename
(
keys
(
%
{
$
hash
}))
{
my
$old_filename
=
$filename
;
# Convert to absolute canonical form
...
...
@@ -2836,28 +3407,50 @@ sub adjust_graph_filenames($$$)
}
if
(
$filename
ne
$old_filename
)
{
$
instr
->
{
$filename
}
=
delete
(
$instr
->
{
$old_filename
});
$
hash
->
{
$filename
}
=
delete
(
$hash
->
{
$old_filename
});
}
}
}
foreach
my
$filename
(
keys
(
%
{
$graph
}))
{
my
$old_filename
=
$filename
;
# Make absolute
# Convert to absolute canonical form
$filename
=
solve_relative_path
(
$base_dir
,
$filename
);
#
# filter_source_files(hash)
#
# Remove unwanted source file data from HASH.
#
# Apply adjustment
if
(
defined
(
$adjust_src_pattern
))
{
$filename
=~
s/$adjust_src_pattern/$adjust_src_replace/g
;
sub
filter_source_files
($)
{
my
(
$hash
)
=
@_
;
foreach
my
$filename
(
keys
(
%
{
$hash
}))
{
# Skip external files if requested
goto
del
if
(
!
$opt_external
&&
is_external
(
$filename
));
# Apply include patterns
if
(
@include_patterns
)
{
my
$keep
;
foreach
my
$pattern
(
@include_patterns
)
{
if
(
$filename
=~
(
/^$pattern$/
))
{
$keep
=
1
;
last
;
}
}
goto
del
if
(
!
$keep
);
}
if
(
$filename
ne
$old_filename
)
{
$graph
->
{
$filename
}
=
delete
(
$graph
->
{
$old_filename
});
# Apply exclude patterns
foreach
my
$pattern
(
@exclude_patterns
)
{
goto
del
if
(
$filename
=~
(
/^$pattern$/
));
}
}
next
;
return
(
$instr
,
$graph
);
del:
# Remove file data
delete
(
$hash
->
{
$filename
});
$excluded_files
{
$filename
}
=
1
;
}
}
#
...
...
@@ -2943,9 +3536,13 @@ sub graph_find_base($)
}
#
# graph_from_bb(bb, fileorder, bb_filename)
# graph_from_bb(bb, fileorder, bb_filename
, fileorder_first
)
#
# Convert data from bb to the graph format and list of instrumented lines.
#
# If FILEORDER_FIRST is set, use fileorder data to determine a functions
# base source file.
#
# Returns (instr, graph).
#
# bb : function name -> file data
...
...
@@ -2963,9 +3560,9 @@ sub graph_find_base($)
# line data : [ line1, line2, ... ]
#
sub
graph_from_bb
($$$)
sub
graph_from_bb
($$$
$
)
{
my
(
$bb
,
$fileorder
,
$bb_filename
)
=
@_
;
my
(
$bb
,
$fileorder
,
$bb_filename
,
$fileorder_first
)
=
@_
;
my
$graph
=
{};
my
$instr
=
{};
my
$basefile
;
...
...
@@ -2982,7 +3579,8 @@ sub graph_from_bb($$$)
$order
=
$fileorder
->
{
$func
};
# Account for lines in functions
if
(
defined
(
$basefile
)
&&
defined
(
$filedata
->
{
$basefile
}))
{
if
(
defined
(
$basefile
)
&&
defined
(
$filedata
->
{
$basefile
})
&&
!
$fileorder_first
)
{
# If the basefile contributes to this function,
# account this function to the basefile.
$graph
->
{
$basefile
}
->
{
$func
}
=
$filedata
->
{
$basefile
};
...
...
@@ -3144,7 +3742,8 @@ sub read_bb($)
}
}
close
(
HANDLE
);
(
$instr
,
$graph
)
=
graph_from_bb
(
$bb
,
$fileorder
,
$bb_filename
);
(
$instr
,
$graph
)
=
graph_from_bb
(
$bb
,
$fileorder
,
$bb_filename
,
0
);
graph_cleanup
(
$graph
);
return
(
$instr
,
$graph
);
...
...
@@ -3332,7 +3931,8 @@ sub read_bbg($)
}
}
close
(
HANDLE
);
(
$instr
,
$graph
)
=
graph_from_bb
(
$bb
,
$fileorder
,
$bbg_filename
);
(
$instr
,
$graph
)
=
graph_from_bb
(
$bb
,
$fileorder
,
$bbg_filename
,
0
);
graph_cleanup
(
$graph
);
return
(
$instr
,
$graph
);
...
...
@@ -3510,7 +4110,7 @@ sub determine_gcno_split_crc($$$$)
# read_gcno_function_record(handle, graph, big_endian, rec_length, version)
#
# Read a gcno format function record from handle and add the relevant data
# to graph. Return (filename, function
) on success, undef on error.
# to graph. Return (filename, function
, artificial) on success, undef on error.
#
sub
read_gcno_function_record
(*$$$$$)
...
...
@@ -3520,6 +4120,7 @@ sub read_gcno_function_record(*$$$$$)
my
$function
;
my
$lineno
;
my
$lines
;
my
$artificial
;
graph_expect
(
"function record"
);
# Skip ident and checksum
...
...
@@ -3537,6 +4138,11 @@ sub read_gcno_function_record(*$$$$$)
graph_expect
(
"function name"
);
$function
=
read_gcno_string
(
$handle
,
$big_endian
);
return
undef
if
(
!
defined
(
$function
));
if
(
$version
>=
$GCOV_VERSION_8_0_0
)
{
$artificial
=
read_gcno_value
(
$handle
,
$big_endian
,
"compiler-generated entity flag"
);
return
undef
if
(
!
defined
(
$artificial
));
}
# Read filename
graph_expect
(
"filename"
);
$filename
=
read_gcno_string
(
$handle
,
$big_endian
);
...
...
@@ -3544,11 +4150,16 @@ sub read_gcno_function_record(*$$$$$)
# Read first line number
$lineno
=
read_gcno_value
(
$handle
,
$big_endian
,
"initial line number"
);
return
undef
if
(
!
defined
(
$lineno
));
# Skip column and ending line number
if
(
$version
>=
$GCOV_VERSION_8_0_0
)
{
graph_skip
(
$handle
,
4
,
"column number"
)
or
return
undef
;
graph_skip
(
$handle
,
4
,
"ending line number"
)
or
return
undef
;
}
# Add to list
push
(
@
{
$bb
->
{
$function
}
->
{
$filename
}},
$lineno
);
graph_add_order
(
$fileorder
,
$function
,
$filename
);
return
(
$filename
,
$function
);
return
(
$filename
,
$function
,
$artificial
);
}
#
...
...
@@ -3578,6 +4189,15 @@ sub map_gcno_version($)
return
$major
<<
16
|
$minor
<<
8
;
}
sub
remove_fn_from_hash
($$)
{
my
(
$hash
,
$fns
)
=
@_
;
foreach
my
$fn
(
@$fns
)
{
delete
(
$hash
->
{
$fn
});
}
}
#
# read_gcno(filename)
#
...
...
@@ -3609,6 +4229,8 @@ sub read_gcno($)
my
$graph
;
my
$filelength
;
my
$version
;
my
$artificial
;
my
@artificial_fns
;
local
*
HANDLE
;
open
(
HANDLE
,
"<"
,
$gcno_filename
)
or
goto
open_error
;
...
...
@@ -3631,6 +4253,10 @@ sub read_gcno($)
debug
(
sprintf
(
"found version 0x%08x\n"
,
$version
));
# Skip stamp
graph_skip
(
*
HANDLE
,
4
,
"file timestamp"
)
or
goto
incomplete
;
if
(
$version
>=
$GCOV_VERSION_8_0_0
)
{
graph_skip
(
*
HANDLE
,
4
,
"support unexecuted blocks flag"
)
or
goto
incomplete
;
}
while
(
!
eof
(
HANDLE
))
{
my
$next_pos
;
my
$curr_pos
;
...
...
@@ -3658,16 +4284,17 @@ sub read_gcno($)
}
# Process record
if
(
$tag
==
$tag_function
)
{
(
$filename
,
$function
)
=
read_gcno_function_record
(
(
$filename
,
$function
,
$artificial
)
=
read_gcno_function_record
(
*
HANDLE
,
$bb
,
$fileorder
,
$big_endian
,
$length
,
$version
);
goto
incomplete
if
(
!
defined
(
$function
));
push
(
@artificial_fns
,
$function
)
if
(
$artificial
);
}
elsif
(
$tag
==
$tag_lines
)
{
# Read lines record
$filename
=
read_gcno_lines_record
(
*
HANDLE
,
$gcno_filename
,
$bb
,
$fileorder
,
$filename
,
$function
,
$big_endian
);
$filename
,
$function
,
$big_endian
);
goto
incomplete
if
(
!
defined
(
$filename
));
}
else
{
# Skip record contents
...
...
@@ -3684,7 +4311,12 @@ sub read_gcno($)
or
goto
incomplete
;
}
close
(
HANDLE
);
(
$instr
,
$graph
)
=
graph_from_bb
(
$bb
,
$fileorder
,
$gcno_filename
);
# Remove artificial functions from result data
remove_fn_from_hash
(
$bb
,
\
@artificial_fns
);
remove_fn_from_hash
(
$fileorder
,
\
@artificial_fns
);
(
$instr
,
$graph
)
=
graph_from_bb
(
$bb
,
$fileorder
,
$gcno_filename
,
1
);
graph_cleanup
(
$graph
);
return
(
$instr
,
$graph
);
...
...
@@ -3730,12 +4362,14 @@ sub get_gcov_capabilities()
'c'
=>
'branch-counts'
,
'f'
=>
'function-summaries'
,
'h'
=>
'help'
,
'i'
=>
'intermediate-format'
,
'l'
=>
'long-file-names'
,
'n'
=>
'no-output'
,
'o'
=>
'object-directory'
,
'p'
=>
'preserve-paths'
,
'u'
=>
'unconditional-branches'
,
'v'
=>
'version'
,
'x'
=>
'hash-filenames'
,
);
foreach
(
split
(
/\n/
,
$help
))
{
...
...
worker/deps/lcov/bin/genpng
浏览文件 @
cb076b7c
#!/usr/bin/
perl -w
#!/usr/bin/
env perl
#
# Copyright (c) International Business Machines Corp., 2002
#
...
...
@@ -30,6 +30,7 @@
#
use
strict
;
use
warnings
;
use
File::
Basename
;
use
Getopt::
Long
;
use
Cwd
qw/abs_path/
;
...
...
worker/deps/lcov/bin/get_changes.sh
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Usage: get_changes.sh
#
# Print lcov change log information as provided by Git
TOOLDIR
=
$(
cd
$(
dirname
$0
)
;
pwd
)
TOOLDIR
=
$(
cd
$(
dirname
$0
)
>
/dev/null
;
pwd
)
cd
$TOOLDIR
...
...
worker/deps/lcov/bin/get_version.sh
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Usage: get_version.sh --version|--release|--full
#
# Print lcov version or release information as provided by Git, .version
# or a fallback.
TOOLDIR
=
$(
cd
$(
dirname
$0
)
;
pwd
)
TOOLDIR
=
$(
cd
$(
dirname
$0
)
>
/dev/null
;
pwd
)
GITVER
=
$(
cd
$TOOLDIR
;
git describe
--tags
2>/dev/null
)
if
[
-z
"
$GITVER
"
]
;
then
...
...
worker/deps/lcov/bin/install.sh
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# install.sh [--uninstall] sourcefile targetfile [install options]
#
...
...
@@ -36,6 +36,10 @@ do_install()
install
-d
$(
dirname
$TARGET
)
install
-p
$PARAMS
$SOURCE
$TARGET
if
[
-n
"
$LCOV_PERL_PATH
"
]
;
then
# Replace Perl interpreter specification
sed
-e
"1 s%^#
\!
.*perl.*
$%
#
\!
$LCOV_PERL_PATH
%"
-i
$TARGET
fi
}
...
...
@@ -51,7 +55,7 @@ do_uninstall()
# Does target exist?
if
test
-r
$TARGET
;
then
# Is target of the same version as this package?
if
diff
-I
'^our \$lcov_version'
-I
'^\.TH '
$SOURCE
$TARGET
>
/dev/null
;
then
if
diff
-I
'^our \$lcov_version'
-I
'^\.TH '
-I
'^#!'
$SOURCE
$TARGET
>
/dev/null
;
then
rm
-f
$TARGET
else
echo
WARNING: Skipping uninstall
for
$TARGET
- versions differ!
>
&2
...
...
worker/deps/lcov/bin/lcov
浏览文件 @
cb076b7c
#!/usr/bin/
perl -w
#!/usr/bin/
env perl
#
# Copyright (c) International Business Machines Corp., 2002,2012
#
...
...
@@ -60,6 +60,7 @@
#
use
strict
;
use
warnings
;
use
File::
Basename
;
use
File::
Path
;
use
File::
Find
;
...
...
@@ -2153,7 +2154,7 @@ sub brcount_to_db($)
{
my
(
$brcount
)
=
@_
;
my
$line
;
my
$db
;
my
$db
=
{}
;
# Add branches to database
foreach
$line
(
keys
(
%
{
$brcount
}))
{
...
...
worker/deps/lcov/bin/updateversion.pl
浏览文件 @
cb076b7c
#!/usr/bin/
perl -w
#!/usr/bin/
env perl
use
strict
;
use
warnings
;
use
File::
Basename
;
...
...
worker/deps/lcov/lcovrc
浏览文件 @
cb076b7c
...
...
@@ -96,6 +96,9 @@ genhtml_desc_html=0
# Specify the precision for coverage rates
#genhtml_precision=1
# Show missed counts instead of hit counts
#genhtml_missed=1
# Demangle C++ symbols
#genhtml_demangle_cpp=1
...
...
@@ -131,6 +134,9 @@ genhtml_desc_html=0
# when collecting coverage data.
geninfo_auto_base = 1
# Use gcov intermediate format? Valid values are 0, 1, auto
geninfo_intermediate = auto
# Directory containing gcov kernel files
# lcov_gcov_dir = /proc/gcov
...
...
worker/deps/lcov/man/gendesc.1
浏览文件 @
cb076b7c
.TH gendesc 1 "LCOV 1.1
3" 2015\-10\-05
"User Manuals"
.TH gendesc 1 "LCOV 1.1
4" 2016\-12\-19
"User Manuals"
.SH NAME
gendesc \- Generate a test case description file
.SH SYNOPSIS
...
...
worker/deps/lcov/man/genhtml.1
浏览文件 @
cb076b7c
.TH genhtml 1 "LCOV 1.1
3" 2015\-10\-05
"User Manuals"
.TH genhtml 1 "LCOV 1.1
4" 2018\-01\-30
"User Manuals"
.SH NAME
genhtml \- Generate HTML view from LCOV coverage data files
.SH SYNOPSIS
...
...
@@ -66,6 +66,7 @@ genhtml \- Generate HTML view from LCOV coverage data files
.br
.RB [ \-\-precision
.IR num ]
.RB [ \-\-missed ]
.br
.IR tracefile(s)
.RE
...
...
@@ -561,6 +562,21 @@ option
.IR genhtml_precision .
.RE
.B \-\-missed
.RS
Show counts of missed lines, functions, or branches
Use this option to change overview pages to show the count of lines, functions,
or branches that were not hit. These counts are represented by negative numbers.
When specified together with \-\-sort, file and directory views will be sorted
by missed counts.
This option can also be configured permanently using the configuration file
option
.IR genhtml_missed .
.RE
.SH FILES
.I /etc/lcovrc
...
...
worker/deps/lcov/man/geninfo.1
浏览文件 @
cb076b7c
.TH geninfo 1 "LCOV 1.1
3" 2015\-10\-05
"User Manuals"
.TH geninfo 1 "LCOV 1.1
4" 2017\-10\-10
"User Manuals"
.SH NAME
geninfo \- Generate tracefiles from .da files
.SH SYNOPSIS
...
...
worker/deps/lcov/man/genpng.1
浏览文件 @
cb076b7c
.TH genpng 1 "LCOV 1.1
3" 2015\-10\-05
"User Manuals"
.TH genpng 1 "LCOV 1.1
4" 2016\-12\-19
"User Manuals"
.SH NAME
genpng \- Generate an overview image from a source file
.SH SYNOPSIS
...
...
worker/deps/lcov/man/lcov.1
浏览文件 @
cb076b7c
.TH lcov 1 "LCOV 1.1
3" 2015\-10\-05
"User Manuals"
.TH lcov 1 "LCOV 1.1
4" 2017\-10\-10
"User Manuals"
.SH NAME
lcov \- a graphical GCOV front\-end
.SH SYNOPSIS
...
...
worker/deps/lcov/man/lcovrc.5
浏览文件 @
cb076b7c
.TH lcovrc 5 "LCOV 1.1
3" 2015\-10\-05
"User Manuals"
.TH lcovrc 5 "LCOV 1.1
4" 2018\-01\-30
"User Manuals"
.SH NAME
lcovrc \- lcov configuration file
...
...
@@ -159,6 +159,11 @@ genhtml_desc_html=0
#genhtml_precision=1
.br
# Show missed counts instead of hit counts
.br
#genhtml_missed=1
.br
# Demangle C++ symbols
.br
#genhtml_demangle_cpp=1
...
...
@@ -218,6 +223,11 @@ geninfo_compat_libtool = 0
geninfo_auto_base = 1
.br
# Use gcov intermediate format? Valid values are 0, 1, auto
.br
geninfo_intermediate = auto
.br
# Directory containing gcov kernel files
.br
lcov_gcov_dir = /proc/gcov
...
...
@@ -604,6 +614,16 @@ displaying coverage rates.
Default is 1.
.PP
.BR genhtml_missed " ="
.IR 0 | 1
.IP
If non-zero, the count of missed lines, functions, or branches is shown
as negative numbers in overview pages.
.br
Default is 0.
.PP
.
.BR geninfo_gcov_tool " ="
.I path_to_gcov
...
...
@@ -774,6 +794,25 @@ located, and in addition, is different between files of the same project.
Default is 1.
.PP
.BR geninfo_intermediate " ="
.IR 0 | 1 | auto
.IP
Specify whether to use gcov intermediate format
.br
Use this option to control whether geninfo should use the gcov intermediate
format while collecting coverage data. The use of the gcov intermediate format
should increase processing speed. It also provides branch coverage data when
using the \-\-initial command line option.
.br
Valid values are 0 for off, 1 for on, and "auto" to let geninfo automatically
use immediate format when supported by gcov.
.br
Default is "auto".
.PP
.BR lcov_gcov_dir " ="
.I path_to_kernel_coverage_data
.IP
...
...
worker/deps/lcov/rpm/lcov.spec
浏览文件 @
cb076b7c
Summary: A graphical GCOV front-end
Name: lcov
Version: 1.1
3
Version: 1.1
4
Release: 1
License: GPLv2+
Group: Development/Tools
...
...
worker/deps/lcov/test/bin/mkinfo
浏览文件 @
cb076b7c
#!/usr/bin/perl
#!/usr/bin/
env
perl
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/bin/norminfo
浏览文件 @
cb076b7c
#!/usr/bin/perl
#!/usr/bin/
env
perl
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/bin/test_run
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/bin/test_skip
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/bin/testsuite_exit
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/bin/testsuite_init
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/genhtml_output/genhtml_test
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/lcov_add_files/add_test
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/lcov_diff/diff_test
浏览文件 @
cb076b7c
#!/
bin/
bash
#!/
usr/bin/env
bash
#
# Copyright IBM Corp. 2017
#
...
...
worker/deps/lcov/test/lcov_summary/check_counts
浏览文件 @
cb076b7c
#!/usr/bin/perl
#!/usr/bin/
env
perl
#
# Copyright IBM Corp. 2017
#
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论