Worker-only nodes now keep fetched blobs in a cache store. Adds tests that drive the coordinator, worker, blob transfer and command line through their failure paths: workers that send malformed or bogus messages, nodes that drop mid-transfer, disks that fail, unusable addresses. Code that only existed to handle failures gRPC reports elsewhere is removed. `make cover` fails unless every statement of hand-written code is executed, and CI runs it.
24 lines
537 B
Bash
Executable File
24 lines
537 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Reads a Go coverage profile and fails if any statement was never executed,
|
|
# listing each one. A block can appear once per test binary, so it counts as
|
|
# covered if any of them ran it.
|
|
set -euo pipefail
|
|
|
|
awk '
|
|
NR > 1 {
|
|
if (!($1 in hits) || $3 > hits[$1]) hits[$1] = $3
|
|
}
|
|
END {
|
|
for (block in hits) {
|
|
if (hits[block] == 0) {
|
|
print "not covered: " block
|
|
missing++
|
|
}
|
|
}
|
|
if (missing) {
|
|
print missing " block(s) of code are not executed by any test"
|
|
exit 1
|
|
}
|
|
print "every statement is covered"
|
|
}' "$1"
|