aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cover.awk
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-11-29 11:50:30 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-29 11:50:30 +0000
commitac33f63b6f7f61de1e2dedcd65b18a056cd8aa81 (patch)
tree4ca8abbfa0a413fb8ea82dd578af5cf6d8795aa0 /tools/cover.awk
parent3cc9280fe7f341b60d4a2384d7fa6e33d575a7a2 (diff)
parentf01e1496ba4c520b011663b1ff634db7a668a383 (diff)
Merge "Move test scripts to tools/"
Diffstat (limited to 'tools/cover.awk')
-rw-r--r--tools/cover.awk25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/cover.awk b/tools/cover.awk
new file mode 100644
index 000000000..e4bb816dc
--- /dev/null
+++ b/tools/cover.awk
@@ -0,0 +1,25 @@
+BEGIN{
+ template = "%6s %-75s\n"
+ printf template, "Delta", "Module Path"
+}
+
+/^-/{
+ s = substr($1, 2)
+ x[s] = $3;
+};
+
+/^+/{
+ s = substr($1, 2)
+ d = $3
+ if (s in x)
+ d = d - x[s]
+ y[s" "d] = d
+}
+
+END{
+ asorti(y, z1, "@val_num_asc")
+ for (i=1; i <= length(z1); i++){
+ split(z1[i], z2, " ")
+ printf template, z2[2], z2[1]
+ }
+}