Browse Source

Fix compile failed without gcc (#3130)

* fix comile failed without gcc

* add sqlite tag for unit test
for-closed-social
Lunny Xiao 6 years ago
committed by Lauris BH
parent
commit
41d6afe0e7
3 changed files with 3 additions and 4 deletions
  1. +3
    -2
      Makefile
  2. +0
    -1
      models/unit_tests.go
  3. +0
    -1
      modules/test/context_tests.go

+ 3
- 2
Makefile 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:

+ 0
- 1
models/unit_tests.go 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"
)

+ 0
- 1
modules/test/context_tests.go 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"
)

Loading…
Cancel
Save