diff --git a/.licenses/go/github.com/mattn/go-isatty.dep.yml b/.licenses/go/github.com/mattn/go-isatty.dep.yml index de6b9c513ec..de6d423c45c 100644 --- a/.licenses/go/github.com/mattn/go-isatty.dep.yml +++ b/.licenses/go/github.com/mattn/go-isatty.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/mattn/go-isatty -version: v0.0.12 +version: v0.0.14 type: go summary: Package isatty implements interface to isatty homepage: https://pkg.go.dev/github.com/mattn/go-isatty diff --git a/.licenses/go/github.com/mattn/go-runewidth.dep.yml b/.licenses/go/github.com/mattn/go-runewidth.dep.yml index f7a5f482cf0..bf7fb170e93 100644 --- a/.licenses/go/github.com/mattn/go-runewidth.dep.yml +++ b/.licenses/go/github.com/mattn/go-runewidth.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/mattn/go-runewidth -version: v0.0.9 +version: v0.0.13 type: go summary: homepage: https://pkg.go.dev/github.com/mattn/go-runewidth diff --git a/.licenses/go/github.com/rivo/uniseg.dep.yml b/.licenses/go/github.com/rivo/uniseg.dep.yml new file mode 100644 index 00000000000..fe6b35ad6f3 --- /dev/null +++ b/.licenses/go/github.com/rivo/uniseg.dep.yml @@ -0,0 +1,33 @@ +--- +name: github.com/rivo/uniseg +version: v0.2.0 +type: go +summary: 'Package uniseg implements Unicode Text Segmentation according to Unicode + Standard Annex #29 (http://unicode.org/reports/tr29/).' +homepage: https://pkg.go.dev/github.com/rivo/uniseg +license: mit +licenses: +- sources: LICENSE.txt + text: | + MIT License + + Copyright (c) 2019 Oliver Kuederle + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/go/golang.org/x/sys/internal/unsafeheader.dep.yml b/.licenses/go/golang.org/x/sys/internal/unsafeheader.dep.yml index 0ee7231edfd..043976e8d4c 100644 --- a/.licenses/go/golang.org/x/sys/internal/unsafeheader.dep.yml +++ b/.licenses/go/golang.org/x/sys/internal/unsafeheader.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/sys/internal/unsafeheader -version: v0.0.0-20210823070655-63515b42dcdf +version: v0.0.0-20220520151302-bc2c85ada10a type: go summary: Package unsafeheader contains header declarations for the Go runtime's slice and string implementations. homepage: https://pkg.go.dev/golang.org/x/sys/internal/unsafeheader license: bsd-3-clause licenses: -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/LICENSE +- sources: sys@v0.0.0-20220520151302-bc2c85ada10a/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/PATENTS +- sources: sys@v0.0.0-20220520151302-bc2c85ada10a/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/go/golang.org/x/sys/unix.dep.yml b/.licenses/go/golang.org/x/sys/unix.dep.yml index b33445f4bcf..0b125d7ada7 100644 --- a/.licenses/go/golang.org/x/sys/unix.dep.yml +++ b/.licenses/go/golang.org/x/sys/unix.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/sys/unix -version: v0.0.0-20210823070655-63515b42dcdf +version: v0.0.0-20220520151302-bc2c85ada10a type: go summary: Package unix contains an interface to the low-level operating system primitives. homepage: https://pkg.go.dev/golang.org/x/sys/unix license: bsd-3-clause licenses: -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/LICENSE +- sources: sys@v0.0.0-20220520151302-bc2c85ada10a/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/PATENTS +- sources: sys@v0.0.0-20220520151302-bc2c85ada10a/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/Taskfile.yml b/Taskfile.yml index 801f21d620a..e62e419ab4a 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -90,7 +90,9 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml go:test: - desc: Run unit tests + desc: Run unit tests and the Go-based integration tests + deps: + - task: go:build dir: '{{default "./" .GO_MODULE_PATH}}' cmds: - | diff --git a/arduino/discovery/discovery_client/go.mod b/arduino/discovery/discovery_client/go.mod index 840449b3c36..5fcd8c8e4da 100644 --- a/arduino/discovery/discovery_client/go.mod +++ b/arduino/discovery/discovery_client/go.mod @@ -15,13 +15,14 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect github.com/leonelquinteros/gotext v1.4.0 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/sirupsen/logrus v1.4.2 // indirect golang.org/x/net v0.0.0-20210505024714-0287a6fb4125 // indirect - golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.6 // indirect google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect google.golang.org/grpc v1.38.0 // indirect diff --git a/arduino/discovery/discovery_client/go.sum b/arduino/discovery/discovery_client/go.sum index 5de1d6d0afb..9368868ab9a 100644 --- a/arduino/discovery/discovery_client/go.sum +++ b/arduino/discovery/discovery_client/go.sum @@ -192,6 +192,8 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/itchyny/gojq v0.12.8/go.mod h1:gE2kZ9fVRU0+JAksaTzjIlgnCa2akU+a1V0WXgJQN5c= +github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -228,9 +230,10 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -264,6 +267,8 @@ github.com/pmylund/sortutil v0.0.0-20120526081524-abeda66eb583/go.mod h1:sFPiU/U github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -287,13 +292,16 @@ github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -306,6 +314,7 @@ go.bug.st/downloader/v2 v2.1.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13R go.bug.st/relaxed-semver v0.9.0/go.mod h1:ug0/W/RPYUjliE70Ghxg77RDHmPxqpo7SHV16ijss7Q= go.bug.st/serial v1.3.2/go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= +go.bug.st/testsuite v0.0.1/go.mod h1:xCIDf97kf9USoz960Foy3CoquwhQmfuFRNh9git70as= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= @@ -472,8 +481,10 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -669,8 +680,9 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/client_example/go.mod b/client_example/go.mod index d49c01cc039..b00743c6f6f 100644 --- a/client_example/go.mod +++ b/client_example/go.mod @@ -12,7 +12,7 @@ require ( require ( github.com/golang/protobuf v1.5.2 // indirect golang.org/x/net v0.0.0-20210505024714-0287a6fb4125 // indirect - golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.6 // indirect google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect google.golang.org/protobuf v1.26.0 // indirect diff --git a/client_example/go.sum b/client_example/go.sum index 5f94f6a6de6..eb7d580b185 100644 --- a/client_example/go.sum +++ b/client_example/go.sum @@ -187,6 +187,8 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/itchyny/gojq v0.12.8/go.mod h1:gE2kZ9fVRU0+JAksaTzjIlgnCa2akU+a1V0WXgJQN5c= +github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -221,7 +223,8 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -249,6 +252,7 @@ github.com/pmylund/sortutil v0.0.0-20120526081524-abeda66eb583/go.mod h1:sFPiU/U github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -271,12 +275,15 @@ github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -289,6 +296,7 @@ go.bug.st/downloader/v2 v2.1.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13R go.bug.st/relaxed-semver v0.9.0/go.mod h1:ug0/W/RPYUjliE70Ghxg77RDHmPxqpo7SHV16ijss7Q= go.bug.st/serial v1.3.2/go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= +go.bug.st/testsuite v0.0.1/go.mod h1:xCIDf97kf9USoz960Foy3CoquwhQmfuFRNh9git70as= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= @@ -455,8 +463,10 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -653,6 +663,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/docsgen/go.mod b/docsgen/go.mod index f7ae2aaf1a2..b2fb83c6364 100644 --- a/docsgen/go.mod +++ b/docsgen/go.mod @@ -43,8 +43,8 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/marcinbor85/gohex v0.0.0-20210308104911-55fb1c624d84 // indirect github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/miekg/dns v1.1.43 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect @@ -53,6 +53,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmylund/sortutil v0.0.0-20120526081524-abeda66eb583 // indirect github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/sergi/go-diff v1.1.0 // indirect @@ -73,7 +74,7 @@ require ( go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45 // indirect golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect golang.org/x/net v0.0.0-20210505024714-0287a6fb4125 // indirect - golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.6 // indirect google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect google.golang.org/grpc v1.38.0 // indirect diff --git a/docsgen/go.sum b/docsgen/go.sum index 4ecc5bb0182..5a115fd1b8c 100644 --- a/docsgen/go.sum +++ b/docsgen/go.sum @@ -214,6 +214,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/itchyny/gojq v0.12.8/go.mod h1:gE2kZ9fVRU0+JAksaTzjIlgnCa2akU+a1V0WXgJQN5c= +github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -261,10 +263,11 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= @@ -302,6 +305,8 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -338,13 +343,16 @@ github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= @@ -364,6 +372,7 @@ go.bug.st/serial v1.3.2 h1:6BFZZd/wngoL5PPYYTrFUounF54SIkykHpT98eq6zvk= go.bug.st/serial v1.3.2/go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45 h1:mACY1anK6HNCZtm/DK2Rf2ZPHggVqeB0+7rY9Gl6wyI= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= +go.bug.st/testsuite v0.0.1/go.mod h1:xCIDf97kf9USoz960Foy3CoquwhQmfuFRNh9git70as= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= @@ -532,8 +541,10 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -737,8 +748,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/go.mod b/go.mod index e335d26045b..305d9f33131 100644 --- a/go.mod +++ b/go.mod @@ -27,8 +27,8 @@ require ( github.com/mailru/easyjson v0.7.7 github.com/marcinbor85/gohex v0.0.0-20210308104911-55fb1c624d84 github.com/mattn/go-colorable v0.1.8 - github.com/mattn/go-isatty v0.0.12 - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.14 + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/miekg/dns v1.1.43 // indirect github.com/oleksandr/bonjour v0.0.0-20160508152359-5dcf00d8b228 // indirect github.com/pkg/errors v0.9.1 @@ -40,7 +40,7 @@ require ( github.com/spf13/cobra v1.2.1 github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/viper v1.8.1 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.0 go.bug.st/cleanup v1.0.0 go.bug.st/downloader/v2 v2.1.1 go.bug.st/relaxed-semver v0.9.0 @@ -57,6 +57,8 @@ require ( gopkg.in/yaml.v2 v2.4.0 ) +require go.bug.st/testsuite v0.0.1 + require ( github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/creack/goselect v0.1.2 // indirect @@ -66,6 +68,8 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/itchyny/gojq v0.12.8 // indirect + github.com/itchyny/timefmt-go v0.1.3 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 // indirect @@ -76,6 +80,7 @@ require ( github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/pelletier/go-toml v1.9.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/spf13/afero v1.6.0 // indirect @@ -84,9 +89,9 @@ require ( github.com/src-d/gcfg v1.4.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/xanzy/ssh-agent v0.2.1 // indirect - golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index af28bd4122c..d4ba7f0c551 100644 --- a/go.sum +++ b/go.sum @@ -216,6 +216,10 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/itchyny/gojq v0.12.8 h1:Zxcwq8w4IeR8JJYEtoG2MWJZUv0RGY6QqJcO1cqV8+A= +github.com/itchyny/gojq v0.12.8/go.mod h1:gE2kZ9fVRU0+JAksaTzjIlgnCa2akU+a1V0WXgJQN5c= +github.com/itchyny/timefmt-go v0.1.3 h1:7M3LGVDsqcd0VZH2U+x393obrzZisp7C0uEe921iRkU= +github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -261,10 +265,11 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= @@ -302,6 +307,8 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -338,13 +345,16 @@ github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= @@ -364,6 +374,8 @@ go.bug.st/serial v1.3.2 h1:6BFZZd/wngoL5PPYYTrFUounF54SIkykHpT98eq6zvk= go.bug.st/serial v1.3.2/go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45 h1:mACY1anK6HNCZtm/DK2Rf2ZPHggVqeB0+7rY9Gl6wyI= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= +go.bug.st/testsuite v0.0.1 h1:sdB+u46r+9ZVqROU1fl5utU773HktWDSc4hz6/jPK6A= +go.bug.st/testsuite v0.0.1/go.mod h1:xCIDf97kf9USoz960Foy3CoquwhQmfuFRNh9git70as= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= @@ -532,8 +544,10 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -737,8 +751,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/integrationtest/arduino-cli.go b/internal/integrationtest/arduino-cli.go new file mode 100644 index 00000000000..e1ad8f29487 --- /dev/null +++ b/internal/integrationtest/arduino-cli.go @@ -0,0 +1,279 @@ +// This file is part of arduino-cli. +// +// Copyright 2022 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +package integrationtest + +import ( + "bytes" + "context" + "fmt" + "io" + "os" + "strings" + "sync" + "time" + + "github.com/arduino/arduino-cli/executils" + "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" + "github.com/arduino/go-paths-helper" + "github.com/fatih/color" + "github.com/stretchr/testify/require" + "go.bug.st/testsuite" + "google.golang.org/grpc" +) + +// ArduinoCLI is an Arduino CLI client. +type ArduinoCLI struct { + path *paths.Path + t *require.Assertions + proc *executils.Process + cliEnvVars []string + cliConfigPath *paths.Path + stagingDir *paths.Path + dataDir *paths.Path + sketchbookDir *paths.Path + daemonAddr string + daemonConn *grpc.ClientConn + daemonClient commands.ArduinoCoreServiceClient +} + +// ArduinoCLIConfig is the configuration of the ArduinoCLI client +type ArduinoCLIConfig struct { + ArduinoCLIPath *paths.Path + UseSharedStagingFolder bool +} + +// NewArduinoCliWithinEnvironment creates a new Arduino CLI client inside the given environment. +func NewArduinoCliWithinEnvironment(env *testsuite.Environment, config *ArduinoCLIConfig) *ArduinoCLI { + color.NoColor = false + cli := &ArduinoCLI{ + path: config.ArduinoCLIPath, + t: require.New(env.T()), + dataDir: env.RootDir().Join("Arduino15"), + sketchbookDir: env.RootDir().Join("Arduino"), + stagingDir: env.RootDir().Join("Arduino15/staging"), + } + if config.UseSharedStagingFolder { + cli.stagingDir = env.SharedDownloadsDir() + } + + cli.cliEnvVars = []string{ + fmt.Sprintf("ARDUINO_DATA_DIR=%s", cli.dataDir), + fmt.Sprintf("ARDUINO_DOWNLOADS_DIR=%s", cli.stagingDir), + fmt.Sprintf("ARDUINO_SKETCHBOOK_DIR=%s", cli.sketchbookDir), + } + env.RegisterCleanUpCallback(cli.CleanUp) + return cli +} + +// CleanUp closes the Arduino CLI client. +func (cli *ArduinoCLI) CleanUp() { + if cli.proc != nil { + cli.daemonConn.Close() + cli.proc.Kill() + cli.proc.Wait() + } +} + +// DataDir returns the data directory +func (cli *ArduinoCLI) DataDir() *paths.Path { + return cli.dataDir +} + +// SketchbookDir returns the sketchbook directory +func (cli *ArduinoCLI) SketchbookDir() *paths.Path { + return cli.sketchbookDir +} + +// Run executes the given arduino-cli command and returns the output. +func (cli *ArduinoCLI) Run(args ...string) ([]byte, []byte, error) { + if cli.cliConfigPath != nil { + args = append([]string{"--config-file", cli.cliConfigPath.String()}, args...) + } + fmt.Println(color.HiBlackString(">>> Running: ") + color.HiYellowString("%s %s", cli.path, strings.Join(args, " "))) + cliProc, err := executils.NewProcessFromPath(cli.cliEnvVars, cli.path, args...) + cli.t.NoError(err) + stdout, err := cliProc.StdoutPipe() + cli.t.NoError(err) + stderr, err := cliProc.StderrPipe() + cli.t.NoError(err) + _, err = cliProc.StdinPipe() + cli.t.NoError(err) + + cli.t.NoError(cliProc.Start()) + + var stdoutBuf, stderrBuf bytes.Buffer + stdoutCtx, stdoutCancel := context.WithCancel(context.Background()) + stderrCtx, stderrCancel := context.WithCancel(context.Background()) + go func() { + io.Copy(&stdoutBuf, io.TeeReader(stdout, os.Stdout)) + stdoutCancel() + }() + go func() { + io.Copy(&stderrBuf, io.TeeReader(stderr, os.Stderr)) + stderrCancel() + }() + cliErr := cliProc.Wait() + <-stdoutCtx.Done() + <-stderrCtx.Done() + fmt.Println(color.HiBlackString("<<< Run completed (err = %v)", cliErr)) + + return stdoutBuf.Bytes(), stderrBuf.Bytes(), cliErr +} + +// StartDaemon starts the Arduino CLI daemon. It returns the address of the daemon. +func (cli *ArduinoCLI) StartDaemon(verbose bool) string { + args := []string{"daemon", "--format", "json"} + if cli.cliConfigPath != nil { + args = append([]string{"--config-file", cli.cliConfigPath.String()}, args...) + } + if verbose { + args = append(args, "-v", "--log-level", "debug") + } + cliProc, err := executils.NewProcessFromPath(cli.cliEnvVars, cli.path, args...) + cli.t.NoError(err) + stdout, err := cliProc.StdoutPipe() + cli.t.NoError(err) + stderr, err := cliProc.StderrPipe() + cli.t.NoError(err) + _, err = cliProc.StdinPipe() + cli.t.NoError(err) + + cli.t.NoError(cliProc.Start()) + cli.proc = cliProc + cli.daemonAddr = "127.0.0.1:50051" + + copy := func(dst io.Writer, src io.Reader) { + buff := make([]byte, 1024) + for { + n, err := src.Read(buff) + if err != nil { + return + } + dst.Write([]byte(color.YellowString(string(buff[:n])))) + } + } + go copy(os.Stdout, stdout) + go copy(os.Stderr, stderr) + conn, err := grpc.Dial(cli.daemonAddr, grpc.WithInsecure(), grpc.WithBlock()) + cli.t.NoError(err) + cli.daemonConn = conn + cli.daemonClient = commands.NewArduinoCoreServiceClient(conn) + + return cli.daemonAddr +} + +// ArduinoCLIInstance is an Arduino CLI gRPC instance. +type ArduinoCLIInstance struct { + cli *ArduinoCLI + instance *commands.Instance +} + +var logCallfMutex sync.Mutex + +func logCallf(format string, a ...interface{}) { + logCallfMutex.Lock() + fmt.Print(color.HiRedString(format, a...)) + logCallfMutex.Unlock() +} + +// Create calls the "Create" gRPC method. +func (cli *ArduinoCLI) Create() *ArduinoCLIInstance { + logCallf(">>> Create()") + resp, err := cli.daemonClient.Create(context.Background(), &commands.CreateRequest{}) + cli.t.NoError(err) + logCallf(" -> %v\n", resp) + return &ArduinoCLIInstance{ + cli: cli, + instance: resp.Instance, + } +} + +// Init calls the "Init" gRPC method. +func (inst *ArduinoCLIInstance) Init(profile string, sketchPath string, respCB func(*commands.InitResponse)) error { + initReq := &commands.InitRequest{ + Instance: inst.instance, + Profile: profile, + SketchPath: sketchPath, + } + logCallf(">>> Init(%v)\n", initReq) + initClient, err := inst.cli.daemonClient.Init(context.Background(), initReq) + if err != nil { + return err + } + for { + msg, err := initClient.Recv() + if err == io.EOF { + logCallf("<<< Init EOF\n") + return nil + } + if err != nil { + return err + } + if respCB != nil { + respCB(msg) + } + } +} + +// BoardList calls the "BoardList" gRPC method. +func (inst *ArduinoCLIInstance) BoardList(timeout time.Duration) (*commands.BoardListResponse, error) { + boardListReq := &commands.BoardListRequest{ + Instance: inst.instance, + Timeout: timeout.Milliseconds(), + } + logCallf(">>> BoardList(%v) -> ", boardListReq) + resp, err := inst.cli.daemonClient.BoardList(context.Background(), boardListReq) + logCallf("err=%v\n", err) + return resp, err +} + +// BoardListWatch calls the "BoardListWatch" gRPC method. +func (inst *ArduinoCLIInstance) BoardListWatch() (commands.ArduinoCoreService_BoardListWatchClient, error) { + boardListWatchReq := &commands.BoardListWatchRequest{ + Instance: inst.instance, + } + logCallf(">>> BoardListWatch(%v)\n", boardListWatchReq) + watcher, err := inst.cli.daemonClient.BoardListWatch(context.Background()) + if err != nil { + return watcher, err + } + return watcher, watcher.Send(boardListWatchReq) +} + +// PlatformInstall calls the "PlatformInstall" gRPC method. +func (inst *ArduinoCLIInstance) PlatformInstall(ctx context.Context, packager, arch, version string, skipPostInst bool) (commands.ArduinoCoreService_PlatformInstallClient, error) { + installCl, err := inst.cli.daemonClient.PlatformInstall(ctx, &commands.PlatformInstallRequest{ + Instance: inst.instance, + PlatformPackage: packager, + Architecture: arch, + Version: version, + SkipPostInstall: skipPostInst, + }) + logCallf(">>> PlatformInstall(%v:%v %v)\n", packager, arch, version) + return installCl, err +} + +// Compile calls the "Compile" gRPC method. +func (inst *ArduinoCLIInstance) Compile(ctx context.Context, fqbn, sketchPath string) (commands.ArduinoCoreService_CompileClient, error) { + compileCl, err := inst.cli.daemonClient.Compile(ctx, &commands.CompileRequest{ + Instance: inst.instance, + Fqbn: fqbn, + SketchPath: sketchPath, + Verbose: true, + }) + logCallf(">>> Compile(%v %v)\n", fqbn, sketchPath) + return compileCl, err +} diff --git a/internal/integrationtest/core/core_test.go b/internal/integrationtest/core/core_test.go new file mode 100644 index 00000000000..090793b7bdd --- /dev/null +++ b/internal/integrationtest/core/core_test.go @@ -0,0 +1,119 @@ +// This file is part of arduino-cli. +// +// Copyright 2022 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +package core_test + +import ( + "fmt" + "strings" + "testing" + + "github.com/arduino/arduino-cli/internal/integrationtest" + "github.com/arduino/go-paths-helper" + "github.com/stretchr/testify/require" + "go.bug.st/testsuite" + "go.bug.st/testsuite/requirejson" +) + +func TestCoreSearch(t *testing.T) { + env := testsuite.NewEnvironment(t) + defer env.CleanUp() + + cli := integrationtest.NewArduinoCliWithinEnvironment(env, &integrationtest.ArduinoCLIConfig{ + ArduinoCLIPath: paths.New("..", "..", "..", "arduino-cli"), + UseSharedStagingFolder: true, + }) + + // Set up an http server to serve our custom index file + test_index := paths.New("..", "testdata", "test_index.json") + url := env.HTTPServeFile(8000, test_index) + + // Run update-index with our test index + _, _, err := cli.Run("core", "update-index", "--additional-urls="+url.String()) + require.NoError(t, err) + + // Search a specific core + out, _, err := cli.Run("core", "search", "avr") + require.NoError(t, err) + require.Greater(t, len(strings.Split(string(out), "\n")), 2) + + out, _, err = cli.Run("core", "search", "avr", "--format", "json") + require.NoError(t, err) + requirejson.NotEmpty(t, out) + + // additional URL + out, _, err = cli.Run("core", "search", "test_core", "--format", "json", "--additional-urls="+url.String()) + require.NoError(t, err) + requirejson.Len(t, out, 1) + + // show all versions + out, _, err = cli.Run("core", "search", "test_core", "--all", "--format", "json", "--additional-urls="+url.String()) + require.NoError(t, err) + requirejson.Len(t, out, 2) + + checkPlatformIsInJSONOutput := func(stdout []byte, id, version string) { + jqquery := fmt.Sprintf(`[{id:"%s", latest:"%s"}]`, id, version) + requirejson.Contains(t, out, jqquery, "platform %s@%s is missing from the output", id, version) + } + + // Search all Retrokit platforms + out, _, err = cli.Run("core", "search", "retrokit", "--all", "--additional-urls="+url.String(), "--format", "json") + require.NoError(t, err) + checkPlatformIsInJSONOutput(out, "Retrokits-RK002:arm", "1.0.5") + checkPlatformIsInJSONOutput(out, "Retrokits-RK002:arm", "1.0.6") + + // Search using Retrokit Package Maintainer + out, _, err = cli.Run("core", "search", "Retrokits-RK002", "--all", "--additional-urls="+url.String(), "--format", "json") + require.NoError(t, err) + checkPlatformIsInJSONOutput(out, "Retrokits-RK002:arm", "1.0.5") + checkPlatformIsInJSONOutput(out, "Retrokits-RK002:arm", "1.0.6") + + // Search using the Retrokit Platform name + out, _, err = cli.Run("core", "search", "rk002", "--all", "--additional-urls="+url.String(), "--format", "json") + require.NoError(t, err) + checkPlatformIsInJSONOutput(out, "Retrokits-RK002:arm", "1.0.5") + checkPlatformIsInJSONOutput(out, "Retrokits-RK002:arm", "1.0.6") + + // Search using board names + out, _, err = cli.Run("core", "search", "myboard", "--all", "--additional-urls="+url.String(), "--format", "json") + require.NoError(t, err) + checkPlatformIsInJSONOutput(out, "Package:x86", "1.2.3") + + runSearch := func(searchArgs string, expectedIDs ...string) { + args := []string{"core", "search", "--format", "json"} + args = append(args, strings.Split(searchArgs, " ")...) + out, _, err := cli.Run(args...) + require.NoError(t, err) + + for _, id := range expectedIDs { + jqquery := fmt.Sprintf(`[{id:"%s"}]`, id) + requirejson.Contains(t, out, jqquery, "platform %s is missing from the output", id) + } + } + + // Check search with case, accents and spaces + runSearch("mkr1000", "arduino:samd") + runSearch("mkr 1000", "arduino:samd") + + runSearch("yún", "arduino:avr") + runSearch("yùn", "arduino:avr") + runSearch("yun", "arduino:avr") + + runSearch("nano 33", "arduino:samd", "arduino:mbed_nano") + runSearch("nano ble", "arduino:mbed_nano") + runSearch("ble", "arduino:mbed_nano") + runSearch("ble nano", "arduino:mbed_nano") + runSearch("nano", "arduino:avr", "arduino:megaavr", "arduino:samd", "arduino:mbed_nano") +} diff --git a/internal/integrationtest/daemon/daemon_board_watch_test.go b/internal/integrationtest/daemon/daemon_board_watch_test.go new file mode 100644 index 00000000000..a526427b45d --- /dev/null +++ b/internal/integrationtest/daemon/daemon_board_watch_test.go @@ -0,0 +1,82 @@ +// This file is part of arduino-cli. +// +// Copyright 2022 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +package daemon_test + +import ( + "context" + "fmt" + "io" + "testing" + "time" + + "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" + "github.com/stretchr/testify/require" +) + +func TestArduinoCliDaemon(t *testing.T) { + // See: https://github.com/arduino/arduino-cli/pull/1804 + + t.SkipNow() // TO BE Removed once the bug is fixed + + env, cli := createEnvForDaemon(t) + defer env.CleanUp() + + grpcInst := cli.Create() + require.NoError(t, grpcInst.Init("", "", func(ir *commands.InitResponse) { + fmt.Printf("INIT> %v\n", ir.GetMessage()) + })) + + // Run a one-shot board list + boardListResp, err := grpcInst.BoardList(time.Second) + require.NoError(t, err) + fmt.Printf("Got boardlist response with %d ports\n", len(boardListResp.GetPorts())) + + // Run a one-shot board list again (should not fail) + boardListResp, err = grpcInst.BoardList(time.Second) + require.NoError(t, err) + fmt.Printf("Got boardlist response with %d ports\n", len(boardListResp.GetPorts())) + + testWatcher := func() { + // Run watcher + watcher, err := grpcInst.BoardListWatch() + require.NoError(t, err) + ctx, cancel := context.WithCancel(context.Background()) + go func() { + defer cancel() + for { + msg, err := watcher.Recv() + if err == io.EOF { + fmt.Println("Watcher EOF") + return + } + require.Empty(t, msg.Error, "Board list watcher returned an error") + require.NoError(t, err, "BoardListWatch grpc call returned an error") + fmt.Printf("WATCH> %v\n", msg) + } + }() + time.Sleep(time.Second) + require.NoError(t, watcher.CloseSend()) + select { + case <-ctx.Done(): + // all right! + case <-time.After(time.Second): + require.Fail(t, "BoardListWatch didn't close") + } + } + + testWatcher() + testWatcher() +} diff --git a/internal/integrationtest/daemon/daemon_compile_test.go b/internal/integrationtest/daemon/daemon_compile_test.go new file mode 100644 index 00000000000..2995c15afc8 --- /dev/null +++ b/internal/integrationtest/daemon/daemon_compile_test.go @@ -0,0 +1,95 @@ +// This file is part of arduino-cli. +// +// Copyright 2022 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +package daemon_test + +import ( + "context" + "fmt" + "io" + "testing" + + "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" + "github.com/arduino/go-paths-helper" + "github.com/stretchr/testify/require" +) + +func TestDaemonCompileOptions(t *testing.T) { + // See: https://github.com/arduino/arduino-cli/issues/1614 + // See: https://github.com/arduino/arduino-cli/pull/1820 + + env, cli := createEnvForDaemon(t) + defer env.CleanUp() + + grpcInst := cli.Create() + require.NoError(t, grpcInst.Init("", "", func(ir *commands.InitResponse) { + fmt.Printf("INIT> %v\n", ir.GetMessage()) + })) + + plInst, err := grpcInst.PlatformInstall(context.Background(), "arduino", "avr", "1.8.5", true) + require.NoError(t, err) + for { + msg, err := plInst.Recv() + if err == io.EOF { + break + } + require.NoError(t, err) + fmt.Printf("INSTALL> %v\n", msg) + } + + // Install boards.local.txt to trigger bug + platformLocalTxt := paths.New("testdata", "boards.local.txt-issue1614") + err = platformLocalTxt.CopyTo(cli.DataDir(). + Join("packages", "arduino", "hardware", "avr", "1.8.5", "boards.local.txt")) + require.NoError(t, err) + + // Re-init instance to update changes + require.NoError(t, grpcInst.Init("", "", func(ir *commands.InitResponse) { + fmt.Printf("INIT> %v\n", ir.GetMessage()) + })) + + // Build sketch (with errors) + sk := paths.New("testdata", "bare_minimum") + compile, err := grpcInst.Compile(context.Background(), "arduino:avr:uno:some_menu=bad", sk.String()) + require.NoError(t, err) + for { + msg, err := compile.Recv() + if err == io.EOF { + require.FailNow(t, "Expected compilation failure", "compilation succeeded") + break + } + if err != nil { + fmt.Println("COMPILE ERROR>", err) + break + } + if msg.ErrStream != nil { + fmt.Printf("COMPILE> %v\n", string(msg.GetErrStream())) + } + } + + // Build sketch (without errors) + compile, err = grpcInst.Compile(context.Background(), "arduino:avr:uno:some_menu=good", sk.String()) + require.NoError(t, err) + for { + msg, err := compile.Recv() + if err == io.EOF { + break + } + require.NoError(t, err) + if msg.ErrStream != nil { + fmt.Printf("COMPILE> %v\n", string(msg.GetErrStream())) + } + } +} diff --git a/internal/integrationtest/daemon/daemon_test.go b/internal/integrationtest/daemon/daemon_test.go new file mode 100644 index 00000000000..f43dbcccc22 --- /dev/null +++ b/internal/integrationtest/daemon/daemon_test.go @@ -0,0 +1,43 @@ +// This file is part of arduino-cli. +// +// Copyright 2022 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +package daemon_test + +import ( + "testing" + + "github.com/arduino/arduino-cli/internal/integrationtest" + "github.com/arduino/go-paths-helper" + "github.com/stretchr/testify/require" + "go.bug.st/testsuite" +) + +// createEnvForDaemon performs the minimum required operations to start the arduino-cli daemon. +// It returns a testsuite.Environment and an ArduinoCLI client to perform the integration tests. +// The Environment must be disposed by calling the CleanUp method via defer. +func createEnvForDaemon(t *testing.T) (*testsuite.Environment, *integrationtest.ArduinoCLI) { + env := testsuite.NewEnvironment(t) + + cli := integrationtest.NewArduinoCliWithinEnvironment(env, &integrationtest.ArduinoCLIConfig{ + ArduinoCLIPath: paths.New("..", "..", "..", "arduino-cli"), + UseSharedStagingFolder: true, + }) + + _, _, err := cli.Run("core", "update-index") + require.NoError(t, err) + + _ = cli.StartDaemon(false) + return env, cli +} diff --git a/internal/integrationtest/daemon/testdata/bare_minimum/bare_minimum.ino b/internal/integrationtest/daemon/testdata/bare_minimum/bare_minimum.ino new file mode 100644 index 00000000000..660bdbccfdb --- /dev/null +++ b/internal/integrationtest/daemon/testdata/bare_minimum/bare_minimum.ino @@ -0,0 +1,2 @@ +void setup() {} +void loop() {} diff --git a/internal/integrationtest/daemon/testdata/boards.local.txt-issue1614 b/internal/integrationtest/daemon/testdata/boards.local.txt-issue1614 new file mode 100644 index 00000000000..5903185453c --- /dev/null +++ b/internal/integrationtest/daemon/testdata/boards.local.txt-issue1614 @@ -0,0 +1,10 @@ +# https://github.com/arduino/arduino-cli/issues/1614 + +menu.some_menu=Some Custom Menu + +uno.menu.some_menu.bad=Bad Option +uno.menu.some_menu.bad.build.extra_flags=-bad-build-extraflags +uno.menu.some_menu.bad.compiler.cpp.extra_flags=-bad-compiler-cpp-extraflags + +uno.menu.some_menu.good=Good Option +uno.menu.some_menu.good.compiler.cpp.extra_flags=-DGOOD_COMPILER_CPP_EXTRA_FLAGS diff --git a/internal/integrationtest/testdata/test_index.json b/internal/integrationtest/testdata/test_index.json new file mode 100644 index 00000000000..f5b5c6c35bd --- /dev/null +++ b/internal/integrationtest/testdata/test_index.json @@ -0,0 +1,210 @@ +{ + "packages": [ + { + "maintainer": "Arduino", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "websiteURL": "https://github.com/Arduino/arduino-cli", + "platforms": [ + { + "category": "Test Category", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "url": "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/core.zip", + "checksum": "SHA-256:6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092", + "name": "test_core", + "version": "1.0.0", + "architecture": "x86", + "archiveFileName": "core.zip", + "size": "486", + "toolsDependencies": [], + "boards": [ + { + "name": "Test Board" + } + ] + }, + { + "category": "Test Category", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "url": "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/core.zip", + "checksum": "SHA-256:6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092", + "name": "test_core", + "version": "2.0.0", + "architecture": "x86", + "archiveFileName": "core.zip", + "size": "486", + "toolsDependencies": [], + "boards": [ + { + "name": "Test Board" + } + ] + } + ], + "tools": [], + "email": "test@example.com", + "name": "test" + }, + { + "name": "zipslip", + "tools": [], + "email": "test@example.com", + "maintainer": "Arduino", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "websiteURL": "https://github.com/Arduino/arduino-cli", + "platforms": [ + { + "category": "Zipslip Test", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "url": "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/evil.zip", + "checksum": "SHA-256:9b85dfe23f13318efc0e541327f584a0f3674a773d46a7eb8b25f0f408d07f96", + "name": "zipslip", + "version": "1.0.0", + "architecture": "x86", + "archiveFileName": "evil.zip", + "size": "2184", + "toolsDependencies": [], + "boards": [ + { + "name": "Test Board" + } + ] + } + ] + }, + { + "name": "brokenchecksum", + "tools": [], + "email": "test@example.com", + "maintainer": "Arduino", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "websiteURL": "https://github.com/Arduino/arduino-cli", + "platforms": [ + { + "category": "BrokenChecksum Test", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "url": "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/core.zip", + "checksum": "SHA-256:1a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092", + "name": "zipslip", + "version": "1.0.0", + "architecture": "x86", + "archiveFileName": "core.zip", + "size": "486", + "toolsDependencies": [], + "boards": [ + { + "name": "Test Board" + } + ] + } + ] + }, + { + "name": "Retrokits-RK002", + "maintainer": "Retrokits (www.retrokits.com)", + "websiteURL": "https://www.retrokits.com", + "email": "info@retrokits.com", + "help": { "online": "https://www.retrokits.com/rk002/arduino" }, + "platforms": [ + { + "name": "RK002", + "architecture": "arm", + "version": "1.0.5", + "category": "Contributed", + "help": { + "online": "https://www.retrokits.com/rk002/arduino" + }, + "url": "https://www.retrokits.com/rk002/arduino/retrokits-rk002-1.0.5.tar.bz2", + "archiveFileName": "retrokits-rk002-1.0.5.tar.bz2", + "checksum": "SHA-256:9a012867baf4bb26f656f84502e0acce6a653c3452cca4505ebac77256802fb6", + "size": "290784", + "boards": [{ "name": "RK002" }], + "toolsDependencies": [ + { + "packager": "arduino", + "version": "4.8.3-2014q1", + "name": "arm-none-eabi-gcc" + } + ] + } + ], + "tools": [] + }, + { + "name": "Retrokits-RK002", + "maintainer": "Retrokits (www.retrokits.com)", + "websiteURL": "https://www.retrokits.com", + "email": "info@retrokits.com", + "help": { "online": "https://www.retrokits.com/rk002/arduino" }, + "platforms": [ + { + "name": "RK002", + "architecture": "arm", + "version": "1.0.6", + "category": "Contributed", + "help": { + "online": "https://www.retrokits.com/rk002/arduino" + }, + "url": "https://www.retrokits.com/rk002/arduino/retrokits-rk002-1.0.6.tar.bz2", + "archiveFileName": "retrokits-rk002-1.0.6.tar.bz2", + "checksum": "SHA-256:8a3b63efcf4dfaed047a37844861387e542d8519485b5305d5979630cb3feb20", + "size": "291631", + "boards": [{ "name": "RK002" }], + "toolsDependencies": [ + { + "packager": "arduino", + "version": "4.8.3-2014q1", + "name": "arm-none-eabi-gcc" + } + ] + } + ], + "tools": [] + }, + { + "name": "Package", + "tools": [], + "email": "test@example.com", + "maintainer": "Arduino", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "websiteURL": "https://github.com/Arduino/arduino-cli", + "platforms": [ + { + "category": "Test", + "help": { + "online": "https://github.com/Arduino/arduino-cli" + }, + "url": "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/core.zip", + "checksum": "SHA-256:6a338cf4d6d501176a2d352c87a8d72ac7488b8c5b82cdf2a4e2cef630391092", + "name": "Platform", + "version": "1.2.3", + "deprecated": true, + "architecture": "x86", + "archiveFileName": "core.zip", + "size": "486", + "toolsDependencies": [], + "boards": [ + { + "name": "MyBoard" + } + ] + } + ] + } + ] +} diff --git a/test/test_core.py b/test/test_core.py index fdf8a711ff5..748714f7c05 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -26,88 +26,6 @@ import semver -def test_core_search(run_command, httpserver): - # Set up the server to serve our custom index file - test_index = Path(__file__).parent / "testdata" / "test_index.json" - httpserver.expect_request("/test_index.json").respond_with_data(test_index.read_text()) - - url = httpserver.url_for("/test_index.json") - assert run_command(["core", "update-index", f"--additional-urls={url}"]) - # search a specific core - result = run_command(["core", "search", "avr"]) - assert result.ok - assert 2 < len(result.stdout.splitlines()) - result = run_command(["core", "search", "avr", "--format", "json"]) - assert result.ok - data = json.loads(result.stdout) - assert 0 < len(data) - # additional URL - result = run_command(["core", "search", "test_core", "--format", "json", f"--additional-urls={url}"]) - assert result.ok - data = json.loads(result.stdout) - assert 1 == len(data) - # show all versions - result = run_command(["core", "search", "test_core", "--all", "--format", "json", f"--additional-urls={url}"]) - assert result.ok - data = json.loads(result.stdout) - assert 2 == len(data) - - def get_platforms(stdout): - data = json.loads(stdout) - platforms = {p["id"]: [] for p in data} - for p in data: - platforms[p["id"]].append(p["latest"]) - return platforms - - # Search all Retrokit platforms - result = run_command(["core", "search", "retrokit", "--all", f"--additional-urls={url}", "--format", "json"]) - assert result.ok - platforms = get_platforms(result.stdout) - assert "1.0.5" in platforms["Retrokits-RK002:arm"] - assert "1.0.6" in platforms["Retrokits-RK002:arm"] - - # Search using Retrokit Package Maintainer - result = run_command(["core", "search", "Retrokits-RK002", "--all", f"--additional-urls={url}", "--format", "json"]) - assert result.ok - platforms = get_platforms(result.stdout) - assert "1.0.5" in platforms["Retrokits-RK002:arm"] - assert "1.0.6" in platforms["Retrokits-RK002:arm"] - - # Search using the Retrokit Platform name - result = run_command(["core", "search", "rk002", "--all", f"--additional-urls={url}", "--format", "json"]) - assert result.ok - platforms = get_platforms(result.stdout) - assert "1.0.5" in platforms["Retrokits-RK002:arm"] - assert "1.0.6" in platforms["Retrokits-RK002:arm"] - - # Search using board names - result = run_command(["core", "search", "myboard", "--all", f"--additional-urls={url}", "--format", "json"]) - assert result.ok - platforms = get_platforms(result.stdout) - assert "1.2.3" in platforms["Package:x86"] - - def run_search(search_args, expected_ids): - res = run_command(["core", "search", "--format", "json"] + search_args.split(" ")) - assert res.ok - data = json.loads(res.stdout) - platform_ids = [p["id"] for p in data] - for platform_id in expected_ids: - assert platform_id in platform_ids - - run_search("mkr1000", ["arduino:samd"]) - run_search("mkr 1000", ["arduino:samd"]) - - run_search("yún", ["arduino:avr"]) - run_search("yùn", ["arduino:avr"]) - run_search("yun", ["arduino:avr"]) - - run_search("nano", ["arduino:avr", "arduino:megaavr", "arduino:samd", "arduino:mbed_nano"]) - run_search("nano 33", ["arduino:samd", "arduino:mbed_nano"]) - run_search("nano ble", ["arduino:mbed_nano"]) - run_search("ble", ["arduino:mbed_nano"]) - run_search("ble nano", ["arduino:mbed_nano"]) - - def test_core_search_no_args(run_command, httpserver): """ This tests `core search` with and without additional URLs in case no args