Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
38e831ca
Unverified
Commit
38e831ca
authored
Jul 24, 2019
by
Massimiliano Pippi
Committed by
GitHub
Jul 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run tests on Appveyor (#303)
parent
b257549b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
4 deletions
+56
-4
Taskfile.yml
Taskfile.yml
+2
-2
appveyor.yml
appveyor.yml
+49
-0
test/conftest.py
test/conftest.py
+1
-2
test/test_main.py
test/test_main.py
+4
-0
No files found.
Taskfile.yml
View file @
38e831ca
...
...
@@ -4,7 +4,7 @@ tasks:
protoc
:
desc
:
Compile protobuf definitions
cmds
:
-
protoc --proto_path=rpc --go_out=plugins=grpc,paths=source_relative:rpc ./rpc/commands/*.proto
-
'
{{
default
"protoc"
.PROTOC_BINARY
}}
--proto_path=rpc
--go_out=plugins=grpc,paths=source_relative:rpc
./rpc/commands/*.proto'
build
:
desc
:
Build the project
...
...
@@ -26,7 +26,7 @@ tasks:
desc
:
Run integration tests only
cmds
:
-
go test -run Integration {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}}
-
pytest test
/
-
pytest test
test-legacy
:
desc
:
Run tests for the `legacy` package
...
...
appveyor.yml
0 → 100644
View file @
38e831ca
build
:
off
deploy
:
off
clone_folder
:
C:\arduino-cli
shallow_clone
:
true
skip_tags
:
true
skip_branch_with_pr
:
true
environment
:
GOPATH
:
c:\gopath
PROTOC_PATH
:
c:\protoc
PROTOC_BINARY
:
protoc.exe
# add protoc, gopath and override default Python 2.7
PATH
:
$(PROTOC_PATH);$(PROTOC_PATH)\bin;$(GOPATH)\bin;C:\Python37;C:\Python37\Scripts;$(PATH)
stack
:
go
1.12
install
:
# install the task executor
-
curl -o task.zip -LO https://github.com/go-task/task/releases/download/v2.6.0/task_windows_amd64.zip
-
7z e task.zip -o%GOPATH%\bin
# golang dependencies needed at test time
-
go get github.com/golangci/govet
-
go get golang.org/x/lint/golint
# Python dependencies needed at test time
-
python -V
-
pip install -r test\requirements.txt
# protobuf tooling needed at test time. We use a very old version of the compiler
# because of this: https://github.com/protocolbuffers/protobuf/issues/3957
-
go get github.com/golang/protobuf/protoc-gen-go
-
curl -o protoc.zip -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.4.0/protoc-3.4.0-win32.zip
-
7z e protoc.zip -o%PROTOC_PATH%
test_script
:
# Check if the Go code is properly formatted and run the linter
-
task.exe check
# Ensure protobufs compile
-
task.exe protoc
# re-enable after fixing go tests
# - task.exe test-integration
# build the binary
-
task.exe build
# run e2e tests
-
pytest test
# uncomment to debug builds
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
\ No newline at end of file
test/conftest.py
View file @
38e831ca
...
...
@@ -24,8 +24,7 @@ def data_dir(tmpdir_factory):
A tmp folder will be created before running
the tests and deleted at the end.
"""
fn
=
tmpdir_factory
.
mktemp
(
'ArduinoTest'
)
return
fn
return
str
(
tmpdir_factory
.
mktemp
(
'ArduinoTest'
))
@
pytest
.
fixture
(
scope
=
"session"
)
...
...
test/test_main.py
View file @
38e831ca
...
...
@@ -62,7 +62,10 @@ def test_command_lib_search(run_command):
assert
number_of_libs
==
number_of_libs_from_json
@
pytest
.
mark
.
skipif
(
os
.
getenv
(
'APPVEYOR'
),
reason
=
"Appveyor VMs have no serial ports"
)
def
test_command_board_list
(
run_command
):
result
=
run_command
(
'core update-index'
)
assert
result
.
ok
result
=
run_command
(
'board list --format json'
)
assert
result
.
ok
# check is a valid json and contains a list of ports
...
...
@@ -73,6 +76,7 @@ def test_command_board_list(run_command):
assert
'protocol_label'
in
port
@
pytest
.
mark
.
skipif
(
os
.
getenv
(
'APPVEYOR'
),
reason
=
"Appveyor VMs have no serial ports"
)
def
test_command_board_listall
(
run_command
):
result
=
run_command
(
'board listall'
)
assert
result
.
ok
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment