mirror of
https://github.com/octoleo/restic.git
synced 2024-10-31 19:02:32 +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
|
all.cov: .gopath
|
||||||
cd $(BASEPATH) && \
|
cd $(BASEPATH) && \
|
||||||
go list ./... | \
|
./coverage_all.sh all.cov
|
||||||
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
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@echo export GOPATH=\"$(GOPATH)\"
|
@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