diff options
| author | Jakob Unterwurzacher | 2026-11-20 22:44:17 +0100 |
|---|---|---|
| committer | Jakob Unterwurzacher | 2026-11-20 22:53:36 +0100 |
| commit | 7190404b14597fa0afffff1313b192c2b83e04cb (patch) | |
| tree | 39de57f39719af9ce863a4b5dc38183f16bf628e /tests/canonical-benchmarks.bash | |
| parent | 173e5056ef8beaa461c5a6665b75e1d97503c5ac (diff) | |
test.bash: collect coverage from unit and integration tests
Most of the test suite runs the gocryptfs binary, so "go test -cover"
alone misses most of the coverage. test.bash now builds a separate
coverage-instrumented binary into ./coverage (./gocryptfs stays a normal
build, so "make install" does not pick it up) and points the tests at it
via $GOCRYPTFS_TEST_BINARY.
"go test -cover" overwrites $GOCOVERDIR with a temporary directory and
ignores the data of other executables in it, so the directory is passed
as $GOCRYPTFS_COVERAGE_DATA and test_helpers sets $GOCOVERDIR from it.
Only our packages that go into the gocryptfs binary are instrumented, so
the reported percentage is relative to that code.
The merged result is written to coverage/coverage.out and
coverage/coverage.html.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/canonical-benchmarks.bash')
| -rwxr-xr-x | tests/canonical-benchmarks.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/canonical-benchmarks.bash b/tests/canonical-benchmarks.bash index 963fd6a..5803896 100755 --- a/tests/canonical-benchmarks.bash +++ b/tests/canonical-benchmarks.bash @@ -49,7 +49,7 @@ dd if=zero of=/dev/null bs=131072 count=2000 2>&1 | tail -n 1 rm zero sleep 0.1 echo -n "UNTAR: " -etime tar xzf /tmp/linux-3.0.tar.gz +etime tar xf /tmp/linux-3.0.tar sleep 0.1 echo -n "MD5: " etime md5sum --quiet -c "$MD5" |
