Skip to content

Commit b8d30dc

Browse files
author
Roberto Sora
authored
[skip changelog] Refactor and add TEST_LDFLAGS to test-unit-race and test-legacy tasks (#1417)
* Bump version of golang in go.mod to 1.16 to align with ditribution containers * Refactor and add TEST_LDFLAGS to test-unit-race and test-legacy tasks in Taskfile * Run
1 parent 4010bcd commit b8d30dc

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Diff for: Taskfile.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,23 @@ tasks:
219219
test-legacy:
220220
desc: Run tests for the `legacy` package
221221
cmds:
222-
- go test {{ default "-v -failfast" .GOFLAGS }} -coverprofile=coverage_legacy.txt ./legacy/...
222+
- |
223+
go test \
224+
{{ default "-v -failfast" .GOFLAGS }} \
225+
-coverprofile=coverage_legacy.txt \
226+
./legacy/... \
227+
{{.TEST_LDFLAGS}}
223228
224229
test-unit-race:
225230
desc: Run unit tests only with race condition detection
226231
cmds:
227-
- go test -short -race {{ default "-v" .GOFLAGS }} -coverprofile=coverage_race_unit.txt {{ default .DEFAULT_GO_PACKAGES .TARGETS }}
232+
- |
233+
go test \
234+
-short \
235+
-race {{ default "-v" .GOFLAGS }} \
236+
-coverprofile=coverage_race_unit.txt \
237+
{{ default .DEFAULT_GO_PACKAGES .TARGETS }} \
238+
{{.TEST_LDFLAGS}}
228239
229240
check:
230241
desc: Check fmt and lint, `legacy` will be skipped

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/arduino/arduino-cli
22

3-
go 1.14
3+
go 1.16
44

55
require (
66
github.com/arduino/board-discovery v0.0.0-20180823133458-1ba29327fb0c

Diff for: go.sum

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ github.com/fluxio/iohelpers v0.0.0-20160419043813-3a4dd67a94d2 h1:C6sOwknxwWfLBE
7070
github.com/fluxio/iohelpers v0.0.0-20160419043813-3a4dd67a94d2/go.mod h1:c7sGIpDbBo0JZZ1tKyC1p5smWf8QcUjK4bFtZjHAecg=
7171
github.com/fluxio/multierror v0.0.0-20160419044231-9c68d39025e5 h1:R8jFW6G/bjoXjWPFrEfw9G5YQDlYhwV4AC+Eonu6wmk=
7272
github.com/fluxio/multierror v0.0.0-20160419044231-9c68d39025e5/go.mod h1:BEUDl7FG1cc76sM0J0x8dqr6RhiL4uqvk6oFkwuNyuM=
73-
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
7473
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
7574
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
7675
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=

0 commit comments

Comments
 (0)