forked from TrueCloudLab/restic
travis: Add new integration tests
This commit is contained in:
parent
954025e399
commit
9b7db4df24
3 changed files with 21 additions and 9 deletions
26
Makefile
26
Makefile
|
@ -48,17 +48,27 @@ gox: .gopath $(SOURCE)
|
|||
cd $(BASEPATH) && \
|
||||
gox -verbose -os "$(GOX_OS)" ./cmd/restic
|
||||
|
||||
test-integration: .gopath restic restic.debug dirdiff
|
||||
# run testsuite
|
||||
PATH=.:$(PATH) ./testsuite.sh
|
||||
test-integration: .gopath
|
||||
cd $(BASEPATH) && go test $(GOTESTFLAGS) \
|
||||
-tags integration \
|
||||
./backend \
|
||||
-cover -covermode=count -coverprofile=integration-sftp.cov \
|
||||
-test.sftppath=$(SFTP_PATH)
|
||||
|
||||
# run sftp integration tests
|
||||
cd $(BASEPATH)/backend && \
|
||||
go test $(GOTESTFLAGS) -test.sftppath $(SFTP_PATH) ./...
|
||||
cd $(BASEPATH) && go test $(GOTESTFLAGS) \
|
||||
-tags integration \
|
||||
./cmd/restic \
|
||||
-cover -covermode=count -coverprofile=integration.cov \
|
||||
-test.datafile=$(PWD)/testsuite/fake-data.tar.gz
|
||||
|
||||
all.cov: .gopath $(SOURCE)
|
||||
all.cov: .gopath $(SOURCE) test-integration
|
||||
cd $(BASEPATH) && \
|
||||
./coverage_all.sh all.cov
|
||||
go list ./... | while read pkg; do \
|
||||
go test -covermode=count -coverprofile=$$(echo $$pkg | base64).cov $$pkg; \
|
||||
done
|
||||
|
||||
echo "mode: count" > all.cov
|
||||
tail -q -n +2 *.cov >> all.cov
|
||||
|
||||
env:
|
||||
@echo export GOPATH=\"$(GOPATH)\"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build integration
|
||||
|
||||
package backend_test
|
||||
|
||||
import (
|
||||
|
|
|
@ -7,4 +7,4 @@ go list ./... | while read pkg; do
|
|||
done
|
||||
|
||||
echo "mode: count" > $TARGETFILE
|
||||
tail -q -n +2 *.cov >> $TARGETFILE
|
||||
tail -q -n +2 *.cov */*.cov */*/*.cov >> $TARGETFILE
|
||||
|
|
Loading…
Reference in a new issue