Skip to content

Commit 0d042f0

Browse files
committed
Re-enabled tests and travis-build
1 parent 147f3d9 commit 0d042f0

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

.travis.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: go
2+
3+
go:
4+
- 1.9.2
5+
6+
install:
7+
- go get github.com/go-errors/errors
8+
- go get github.com/stretchr/testify
9+
- go get github.com/jstemmer/go-junit-report
10+
- go get golang.org/x/tools/cmd/cover
11+
- go get github.com/mattn/goveralls
12+
- go get github.com/wadey/gocovmerge
13+
- go get github.com/arduino/go-properties-map
14+
- go get github.com/arduino/go-timeutils
15+
16+
script:
17+
- go build -o $HOME/arduino-builder -v github.com/arduino/arduino-builder/arduino-builder
18+
- export TEST_PACKAGES=`go list github.com/arduino/arduino-builder/...`
19+
- 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 )
20+
21+
after_success:
22+
- bin/gocovmerge coverage.*.out > coverage.out
23+
- bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
24+
25+
env:
26+
global:
27+
secure: mm7X+dFQD4tUYwXxeVOJzereC04KdpTe6vrho1g6zmWgnMEqBe/gnX16Hv1LeQRzTnMVUxpcTXMkh4Nj16WL2IFAnizWiiMfFb6wUBBOM0dFhYJR7EzSzKMu7/CuhxIqT5ps/Ls3UUnpzUoI9ImygiLJCaNJCSjJxQ+hwnxyyEZD0FHvlQQcv3kiKAd8sg9oWKqTSBGIwBnn9ZGT9G2uykv+XU2B5B+dW9IoXaDR3SfUGlANldorD4T6S9QNs+JdwhX1NDDd7rOqF92qu2RA0TFf2Ljy1STimLXvVhGgcfetsUhVgkmDGKxp1/iax4jlJ8wRU7faqeFAt1WvJpBaOnsK8OcsNqf7iqmYxWxHKavFHfGKgc7L+dMP9gWIqgtzmfqG94/49IN8lPMpB29J8sfZfrb4nKNu66S9GqQCr/jgGD1uTXzC6SggoL6ro2di0bAvAlb6zgpv5zChqKkTzhHE/6rVA6EZG/JIIx5lXaDvkD+yp3o2LNKNknpwRPEY0KpReRivvajucDwiPqQD79gkKWOGtoo5034SGSGCUmXvAydJNVPJt6c5ADKpVgyiT065Gja4/n+n4GhjT6QKc2WRGQRQZGtkYkNh95tKUvgZiZ1G7+EAuRCotoKiqLPkLgUpzCoD7kZpo/Ai5xU2aRcKpMsAHEHSRP9F06F+zp4=

README.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,26 @@ See [Doing continuous integration with arduino builder](https://github.com/ardui
5555

5656
### Building from source
5757

58-
You need [Go 1.6.3](https://golang.org/dl/#go1.6.3).
58+
You need [a recent version of Go (>=1.8.0)](https://golang.org/).
5959

60-
To install `codereview/patch` you have to install [Mercurial](https://www.mercurial-scm.org/) first.
61-
62-
To set things up, run the following inside the cloned arduino-builder
63-
directory:
60+
To build, run the following commands:
6461

6562
```
66-
export GOPATH=$(pwd)
6763
go get github.com/go-errors/errors
6864
go get github.com/stretchr/testify
6965
go get github.com/jstemmer/go-junit-report
70-
go build arduino.cc/arduino-builder
66+
go get github.com/arduino/go-properties-map
67+
go get github.com/arduino/go-timeutils
68+
go get github.com/arduino/arduino-builder
69+
go build github.com/arduino/arduino-builder/arduino-builder
7170
```
7271

73-
After installing dependencies, you do not need to run the `go get`
74-
commands again, but you will have to set `GOPATH` again for every shell
75-
you want to build in.
76-
7772
### TDD
7873

7974
In order to run the tests, type:
8075

8176
```
82-
go test arduino.cc/...
77+
go test github.com/arduino/arduino-builder/arduino-builder/...
8378
```
8479

8580
This runs all tests, showing any failures and a summary at the end.
@@ -93,13 +88,13 @@ To run a single test, use the -run option, which accepts a regular
9388
expression (see also go help testflag).
9489

9590
```
96-
go test arduino.cc/... -run 'TestBuilderEmptySketch'
97-
go test arduino.cc/... -run 'TestPrototypesAdder.*'
91+
go test github.com/arduino/arduino-builder/arduino-builder/... -run 'TestBuilderEmptySketch'
92+
go test github.com/arduino/arduino-builder/arduino-builder/... -run 'TestPrototypesAdder.*'
9893
```
9994

10095
In jenkins, use
10196
```
102-
go test -v arduino.cc/... | bin/go-junit-report > report.xml
97+
go test -v github.com/arduino/arduino-builder/arduino-builder/... | bin/go-junit-report > report.xml
10398
```
10499

105100
The first time you run the tests, some needed files (toolchains and
@@ -114,6 +109,6 @@ increasing the timeout might be needed as well.
114109

115110
`arduino-builder` is licensed under General Public License version 2, as published by the Free Software Foundation. See [LICENSE.txt](LICENSE.txt).
116111

117-
Copyright (C) 2015 Arduino LLC and contributors
112+
Copyright (C) 2017 Arduino AG and contributors
118113

119114
See https://www.arduino.cc/ and https://github.com/arduino/arduino-builder/graphs/contributors

test/helper_tools_downloader.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ func coreAlreadyDownloadedAndUnpacked(targetPath string, core Core) (bool, error
379379
if os.IsNotExist(err) {
380380
return false, nil
381381
}
382-
platform, err := properties.Load(filepath.Join(corePath, "platform.txt"), i18n.HumanLogger{})
382+
platform, err := properties.Load(filepath.Join(corePath, "platform.txt"))
383383
if err != nil {
384384
return false, i18n.WrapError(err)
385385
}
@@ -435,7 +435,7 @@ func libraryAlreadyDownloadedAndUnpacked(targetPath string, library Library) boo
435435
return false
436436
}
437437

438-
libProps, err := properties.Load(filepath.Join(targetPath, strings.Replace(library.Name, " ", "_", -1), "library.properties"), i18n.HumanLogger{})
438+
libProps, err := properties.Load(filepath.Join(targetPath, strings.Replace(library.Name, " ", "_", -1), "library.properties"))
439439
if err != nil {
440440
return false
441441
}

0 commit comments

Comments
 (0)