-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverage
More file actions
executable file
·68 lines (50 loc) · 2.01 KB
/
coverage
File metadata and controls
executable file
·68 lines (50 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# libslack - https://libslack.org
#
# Copyright (C) 1999-2004, 2010, 2020-2023 raf <raf@raf.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# 20230824 raf <raf@raf.org>
#
# coverage - Do maximum gcov test coverage analysis
make clean default
./configure --enable-test --enable-test-rwlock --enable-gcov
perl -pi -e 's/^(GETOPT := getopt)$/# $1/' macros.mk
perl -pi -e 's/^enum { DAYS = 10, HOURS = 24, MINUTES = 60, SECONDS = 60,/enum { DAYS = 2, HOURS = 2, MINUTES = 2, SECONDS = 2,/' agent.c
make
make test
sudo make test
trim() { perl -ne 'print unless /^$|^ /'; }
trail() { trim | tail -5; }
test/agent activity | trim # 13s, 102 lines
test/agent oob | trim # 1 line
test/agent accuracy1 | trail # 13s, 1004 lines
test/agent accuracy2 | trail # 40s, 79 lines
test/agent accuracy3 | trail # 40s, 79 lines
test/agent delay | trim # 1s
test/lim -v # 21 lines
test/locker debug | trail # 33 lines
test/locker time # 8s, 39 lines
test/map debug | trail # ~60k lines
test/map hash # 1s, 18 lines
test/mem pool # Doesn't increase coverage
test/net multicast | trim
test/net rudp | trim # 105s
test/vsscanf show # Doesn't increase coverage
#test/snprintf verbose | trail # 145877 lines, Doesn't increase coverage
#test/str debug | trail # 98458 lines, Doesn't increase coverage
make gcov
perl -pi -e 's/^enum { DAYS = 2, HOURS = 2, MINUTES = 2, SECONDS = 2,/enum { DAYS = 10, HOURS = 24, MINUTES = 60, SECONDS = 60,/' agent.c
make default