Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip changelog] Move integration tests to pytest #564

Merged
merged 9 commits into from Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions CONTRIBUTING.md
Expand Up @@ -60,6 +60,7 @@ see following paragraph):
task test-integration
```
### Running only some tests

By default, all tests from all go packages are run. To run only unit
tests from one or more specific packages, you can set the TARGETS
environment variable, e.g.:
Expand All @@ -75,11 +76,6 @@ Both can be combined as well, typically to run only a specific test:

TEST_REGEX='^TestFindBoardWithFQBN$' TARGETS=./arduino/cores/packagemanager task test-unit

For integration test, the same options are supported. Note that when not
specified, `TEST_REGEX` defaults to "Integration" to select only
integration tests, so if you specify a broader regex, this could cause
non-integration tests to be run as well.

### Integration tests

Being a command line interface, Arduino CLI is heavily interactive and it has to
Expand All @@ -95,7 +91,8 @@ assess the options are correctly understood and the output is what we expect.
To run the full suite of integration tests you need an Arduino device attached
to a serial port and a working Python environment. Chances are that you already
have Python installed in your system, if this is not the case you can
[download][3] the official distribution or use the package manager provided by your Operating System.
[download][3] the official distribution or use the package manager provided by
your Operating System.

Some dependencies need to be installed before running the tests and to avoid
polluting your global Python enviroment with dependencies that might be only
Expand Down Expand Up @@ -151,7 +148,8 @@ a list of items you can check before submitting a PR:
* Maintain **clean commit history** and use **meaningful commit messages**.
PRs with messy commit history are difficult to review and require a lot of
work to be merged.
* Your PR must pass all CI tests before we will merge it. If you're seeing an error and don't think
* Your PR must pass all CI tests before we will merge it. If you're seeing an
error and don't think
it's your fault, it may not be! The reviewer will help you if there are test
failures that seem
not related to the change you are making.
Expand Down
1 change: 0 additions & 1 deletion Taskfile.yml
Expand Up @@ -27,7 +27,6 @@ tasks:
test-integration:
desc: Run integration tests only
cmds:
- go test -run '{{ default "Integration" .TEST_REGEX }}' {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}}
- pytest test

test-legacy:
Expand Down