Skip to content

Commit

Permalink
Fix compile failed without gcc (go-gitea#3130)
Browse files Browse the repository at this point in the history
* fix comile failed without gcc

* add sqlite tag for unit test
  • Loading branch information
lunny authored and lafriks committed Dec 10, 2017
1 parent eb6cbed commit 41d6afe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion models/unit_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
1 change: 0 additions & 1 deletion modules/test/context_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 41d6afe

Please sign in to comment.