Commit dcfd2a49 authored by Cristian Maglie's avatar Cristian Maglie

Updated arduino-builder

parent 14ad16cc
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
[[projects]] [[projects]]
branch = "cli-inception" branch = "cli-inception"
digest = "1:95d51ed84745c25bb7a9ec3cc9e530cd611cad04645d00c21c5b8a1faccf2e4f" digest = "1:da33441fbc4cb624982fbb0bb8ec49d50fda8b0497953c710299c1533d8cc682"
name = "github.com/arduino/arduino-builder" name = "github.com/arduino/arduino-builder"
packages = [ packages = [
".", ".",
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"utils", "utils",
] ]
pruneopts = "UT" pruneopts = "UT"
revision = "eb9e737c5c13f3dc7421e8a953f0414abbbb39a9" revision = "8f0fb63d56c77aa3265ea387b777970df2442977"
source = "github.com/arduino/arduino-builder" source = "github.com/arduino/arduino-builder"
[[projects]] [[projects]]
......
language: go language: go
os:
- linux
- osx
go: go:
- 1.9.2 - 1.11.x
install: install:
- go get github.com/go-errors/errors - go get github.com/go-errors/errors
- go get github.com/stretchr/testify - go get github.com/stretchr/testify
- go get github.com/jstemmer/go-junit-report - go get github.com/jstemmer/go-junit-report
- go get github.com/arduino/go-paths-helper
- go get github.com/arduino/go-properties-orderedmap
- go get github.com/arduino/go-timeutils
- go get google.golang.org/grpc
- go get github.com/golang/protobuf/proto
- go get golang.org/x/net/context
- go get github.com/fsnotify/fsnotify
- go get github.com/arduino/arduino-cli
- go get golang.org/x/tools/cmd/cover - go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls - go get github.com/mattn/goveralls
- go get github.com/wadey/gocovmerge - go get github.com/wadey/gocovmerge
- go get github.com/arduino/go-properties-orderedmap
- go get github.com/arduino/go-timeutils
script: script:
- go get github.com/arduino/arduino-builder/arduino-builder - rm -r $GOPATH/src/github.com/arduino/arduino-cli/vendor/github.com/arduino/go-paths-helper
- rm -r $GOPATH/src/github.com/arduino/arduino-cli/vendor/github.com/arduino/go-properties-orderedmap
- rm -r $GOPATH/src/github.com/arduino/arduino-cli/vendor/github.com/arduino/go-timeutils
- go build -o $HOME/arduino-builder -v github.com/arduino/arduino-builder/arduino-builder - go build -o $HOME/arduino-builder -v github.com/arduino/arduino-builder/arduino-builder
- export TEST_PACKAGES=`go list github.com/arduino/arduino-builder/...` - export TEST_PACKAGES=`go list github.com/arduino/arduino-builder/...`
- RES=0; I=0; for PKG in $TEST_PACKAGES; do go test -v -timeout 30m -covermode=count -coverprofile=coverage.$I.out $PKG; ((RES=RES+$?)); ((I++)); done; ( exit $RES ) - RES=0; I=0; for PKG in $TEST_PACKAGES; do go test -v -timeout 30m -covermode=count -coverprofile=coverage.$I.out $PKG; ((RES=RES+$?)); ((I++)); done; ( exit $RES )
after_success: after_success:
- bin/gocovmerge coverage.*.out > coverage.out - $GOPATH/bin/gocovmerge coverage.*.out > coverage.out
- bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN - $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
env: env:
global: global:
......
...@@ -63,6 +63,7 @@ To build, run the following commands: ...@@ -63,6 +63,7 @@ To build, run the following commands:
go get github.com/go-errors/errors go get github.com/go-errors/errors
go get github.com/stretchr/testify go get github.com/stretchr/testify
go get github.com/jstemmer/go-junit-report go get github.com/jstemmer/go-junit-report
go get -u github.com/arduino/go-paths-helper
go get -u github.com/arduino/go-properties-orderedmap go get -u github.com/arduino/go-properties-orderedmap
go get -u github.com/arduino/go-timeutils go get -u github.com/arduino/go-timeutils
go get google.golang.org/grpc go get google.golang.org/grpc
......
...@@ -109,10 +109,10 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error { ...@@ -109,10 +109,10 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
// Use old ctags method to generate export file // Use old ctags method to generate export file
commands := []types.Command{ commands := []types.Command{
&ContainerMergeCopySketchFiles{}, //&ContainerMergeCopySketchFiles{},
&ContainerAddPrototypes{}, &ContainerAddPrototypes{},
&FilterSketchSource{Source: &ctx.Source, RemoveLineMarkers: true}, //&FilterSketchSource{Source: &ctx.Source, RemoveLineMarkers: true},
&SketchSaver{}, //&SketchSaver{},
} }
for _, command := range commands { for _, command := range commands {
......
...@@ -72,8 +72,7 @@ func functionNameUsedAsFunctionPointerIn(tag *types.CTag, functionTags []*types. ...@@ -72,8 +72,7 @@ func functionNameUsedAsFunctionPointerIn(tag *types.CTag, functionTags []*types.
if tag.Line != functionTag.Line && strings.Index(tag.Code, "&"+functionTag.FunctionName) != -1 { if tag.Line != functionTag.Line && strings.Index(tag.Code, "&"+functionTag.FunctionName) != -1 {
return true return true
} }
if tag.Line != functionTag.Line && strings.Index(tag.Code, functionTag.FunctionName) != -1 && if tag.Line != functionTag.Line && strings.Index(strings.TrimSpace(tag.Code), "("+functionTag.FunctionName+")") != -1 {
(functionTag.Signature == "(void)" || functionTag.Signature == "()") {
return true return true
} }
} }
......
...@@ -153,7 +153,7 @@ func FilterFiles() filterFiles { ...@@ -153,7 +153,7 @@ func FilterFiles() filterFiles {
} }
} }
var SOURCE_CONTROL_FOLDERS = map[string]bool{"CVS": true, "RCS": true, ".git": true, ".github": true, ".svn": true, ".hg": true, ".bzr": true, ".vscode": true} var SOURCE_CONTROL_FOLDERS = map[string]bool{"CVS": true, "RCS": true, ".git": true, ".github": true, ".svn": true, ".hg": true, ".bzr": true, ".vscode": true, ".settings": true}
func IsSCCSOrHiddenFile(file os.FileInfo) bool { func IsSCCSOrHiddenFile(file os.FileInfo) bool {
return IsSCCSFile(file) || IsHiddenFile(file) return IsSCCSFile(file) || IsHiddenFile(file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment