@cryptotaxi247 / kubo / commits / 891b4c569

coverage_helper: better group long and short options

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Oct 24, 2015 at 11:22 UTC 891b4c569e52c7d125e758117815d4c248b6aec0
1 file changed +4 -1
test/sharness_test_coverage_helper.sh
+4 -1
@@ -148,7 +148,6 @@ process_command() {
148
149 egrep "$PATTERN" "$CMD_RES" >"$CMD_OUT.txt"
150 reverse "$CMD_OUT.txt" | sed -e 's/^sharness\///' | cut -d- -f1 | uniq -c >>"$GLOBAL_REV"
151 - echo "$NAME" >>"$GLOBAL_REV"
151 fi
152 }
153
@@ -159,10 +158,14 @@ do
158
159 log "Processing $LONG_CMD"
160 process_command $LONG_CMD
161 + LONG_NAME="$NAME"
162
163 log "Processing $SHORT_CMD"
164 process_command $SHORT_CMD
165 + SHORT_NAME="$NAME"
166
167 + test -n "$SHORT_CMD" && echo "$SHORT_NAME" >>"$GLOBAL_REV"
168 + test "$LONG_CMD" != "ipfs" && echo "$LONG_NAME" >>"$GLOBAL_REV"
169 echo >>"$GLOBAL_REV"
170 done
171