Fix compile failed without gcc (#3130)

* fix comile failed without gcc

* add sqlite tag for unit test
This commit is contained in:
Lunny Xiao 2017-12-10 22:08:19 +08:00 committed by Lauris BH
parent eb6cbedcc0
commit 41d6afe0e7
3 changed files with 3 additions and 4 deletions

View File

@ -131,7 +131,8 @@ fmt-check:
.PHONY: test
test:
$(GO) test $(PACKAGES)
$(GO) build # test if go build succeed without sqlite support
$(GO) test -tags=sqlite $(PACKAGES)
.PHONY: coverage
coverage:
@ -142,7 +143,7 @@ coverage:
.PHONY: unit-test-coverage
unit-test-coverage:
for PKG in $(PACKAGES); do $(GO) test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
for PKG in $(PACKAGES); do $(GO) test -tags=sqlite -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
.PHONY: test-vendor
test-vendor:

View File

@ -15,7 +15,6 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
_ "github.com/mattn/go-sqlite3" // for the test engine
"github.com/stretchr/testify/assert"
"gopkg.in/testfixtures.v2"
)

View File

@ -14,7 +14,6 @@ import (
"code.gitea.io/gitea/modules/context"
"github.com/go-macaron/session"
_ "github.com/mattn/go-sqlite3" // for the test engine
"github.com/stretchr/testify/assert"
"gopkg.in/macaron.v1"
)