mirror of
https://github.com/octoleo/restic.git
synced 2024-11-28 07:46:36 +00:00
Makefile: Split out coverage into a shell script
This commit is contained in:
parent
be8064cd97
commit
b7e1d2788b
6
Makefile
6
Makefile
@ -49,11 +49,7 @@ test-integration: .gopath
|
||||
|
||||
all.cov: .gopath
|
||||
cd $(BASEPATH) && \
|
||||
go list ./... | \
|
||||
while read pkg; do \
|
||||
go test -covermode=count -coverprofile=$$(base64 <<< $$pkg).cov $$pkg; \
|
||||
done
|
||||
echo "mode: count" > all.cov; tail -q -n +2 *.cov >> all.cov
|
||||
./coverage_all.sh all.cov
|
||||
|
||||
env:
|
||||
@echo export GOPATH=\"$(GOPATH)\"
|
||||
|
10
coverage_all.sh
Executable file
10
coverage_all.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
TARGETFILE="$1"
|
||||
|
||||
go list ./... | while read pkg; do
|
||||
go test -covermode=count -coverprofile=$(base64 <<< $pkg).cov $pkg
|
||||
done
|
||||
|
||||
echo "mode: count" > $TARGETFILE
|
||||
tail -q -n +2 *.cov >> $TARGETFILE
|
Loading…
Reference in New Issue
Block a user