Skip to content

Commit fc9b70b

Browse files
Massimiliano PippiMaurizio Branca
Massimiliano Pippi
and
Maurizio Branca
authored
[skip changelog] Move integration tests to pytest (#564)
* move compilation tests to pytest * moved core tests to pytest * moved core install/upgrade/uninstall to pytest * Added detected_boards fixture Co-authored-by: Maurizio Branca <m.branca@arduino.cc> * add upload tests, remove mocked ones * use fixture * docs + dont run go tests anymore * remove debug prints, bump pytest to latest * skip problematic test on win Co-authored-by: Maurizio Branca <m.branca@arduino.cc>
1 parent 1952d7b commit fc9b70b

File tree

14 files changed

+252
-524
lines changed

14 files changed

+252
-524
lines changed

CONTRIBUTING.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ see following paragraph):
6060
task test-integration
6161
```
6262
### Running only some tests
63+
6364
By default, all tests from all go packages are run. To run only unit
6465
tests from one or more specific packages, you can set the TARGETS
6566
environment variable, e.g.:
@@ -75,11 +76,6 @@ Both can be combined as well, typically to run only a specific test:
7576

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

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

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

10097
Some dependencies need to be installed before running the tests and to avoid
10198
polluting your global Python enviroment with dependencies that might be only
@@ -151,7 +148,8 @@ a list of items you can check before submitting a PR:
151148
* Maintain **clean commit history** and use **meaningful commit messages**.
152149
PRs with messy commit history are difficult to review and require a lot of
153150
work to be merged.
154-
* Your PR must pass all CI tests before we will merge it. If you're seeing an error and don't think
151+
* Your PR must pass all CI tests before we will merge it. If you're seeing an
152+
error and don't think
155153
it's your fault, it may not be! The reviewer will help you if there are test
156154
failures that seem
157155
not related to the change you are making.

Taskfile.yml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ tasks:
2727
test-integration:
2828
desc: Run integration tests only
2929
cmds:
30-
- go test -run '{{ default "Integration" .TEST_REGEX }}' {{ default "-v" .GOFLAGS }} -coverprofile=coverage_integ.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}}
3130
- pytest test
3231

3332
test-legacy:

0 commit comments

Comments
 (0)