2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

travis: Add new integration tests

This commit is contained in:
Alexander Neumann 2015-05-09 22:40:10 +02:00
parent 954025e399
commit 9b7db4df24
3 changed files with 21 additions and 9 deletions

View File

@ -48,17 +48,27 @@ gox: .gopath $(SOURCE)
cd $(BASEPATH) && \ cd $(BASEPATH) && \
gox -verbose -os "$(GOX_OS)" ./cmd/restic gox -verbose -os "$(GOX_OS)" ./cmd/restic
test-integration: .gopath restic restic.debug dirdiff test-integration: .gopath
# run testsuite cd $(BASEPATH) && go test $(GOTESTFLAGS) \
PATH=.:$(PATH) ./testsuite.sh -tags integration \
./backend \
-cover -covermode=count -coverprofile=integration-sftp.cov \
-test.sftppath=$(SFTP_PATH)
# run sftp integration tests cd $(BASEPATH) && go test $(GOTESTFLAGS) \
cd $(BASEPATH)/backend && \ -tags integration \
go test $(GOTESTFLAGS) -test.sftppath $(SFTP_PATH) ./... ./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) && \ 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: env:
@echo export GOPATH=\"$(GOPATH)\" @echo export GOPATH=\"$(GOPATH)\"

View File

@ -1,3 +1,5 @@
// +build integration
package backend_test package backend_test
import ( import (

View File

@ -7,4 +7,4 @@ go list ./... | while read pkg; do
done done
echo "mode: count" > $TARGETFILE echo "mode: count" > $TARGETFILE
tail -q -n +2 *.cov >> $TARGETFILE tail -q -n +2 *.cov */*.cov */*/*.cov >> $TARGETFILE