File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,22 @@ test "$1" = "-h" -o -z "$1" && {
9
9
echo Example: $0 ../target/out \" tools/target @@\"
10
10
exit 1
11
11
}
12
+
12
13
test -d " $1 " || { echo Error: not a directory: $1 ; exit 1 ; }
13
14
test -e " $1 " /queue || { echo Error: not an afl-fuzz -o out directory ; exit 1 ; }
15
+
16
+ HOMEPATH=` dirname $0 `
14
17
DST=` realpath " $1 " `
18
+ export PATH=$HOMEPATH :$PATH
19
+
15
20
afl-cov -v -d " $DST " --cover-corpus --coverage-cmd " $2 " --code-dir . --overwrite
21
+
16
22
test -e " $1 " /fuzzer_stats && {
17
23
echo " runtime :" $( expr ` grep last_update " $DST " /fuzzer_stats| awk ' {print$3}' ` - ` grep start_time " $DST " /fuzzer_stats| awk ' {print$3}' ` ) seconds
18
24
egrep ' execs_done|paths_total|^unique_|stability' " $DST " /fuzzer_stats
19
- }
25
+ LINES=
26
+ test -e " $1 " /cov/afl-cov.log && LINES=` grep -w lines " $1 " /cov/afl-cov.log| tail -n 1| sed ' s/.*(//' | sed ' s/ .*//' `
27
+ echo " coverage : $LINES "
28
+ } | tee " $1 " /stats.out
29
+
20
30
echo open " file://$DST /cov/web/index.html"
You can’t perform that action at this time.
0 commit comments