Skip to content

Commit c49d2e8

Browse files
author
Roberto Sora
committed
Use patched invoke in e2e requirements
In order to overcome issue reported here #416 we used successfully this patch pyinvoke/invoke#661 in the requirements.txt so we re-enable the test pipeline step for e2e tests on win
1 parent 8425d79 commit c49d2e8

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

Diff for: .github/workflows/test.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ jobs:
5858
architecture: 'x64'
5959

6060
- name: Run integration tests
61-
# Since we are investigating issues emerged
62-
# with python integration tests on windows
63-
# this step is disabled for windows-2019
64-
# platform ATM
65-
if: matrix.operating-system != 'windows-2019'
6661
run: |
6762
pip install -r test/requirements.txt
6863
task test-integration

Diff for: test/conftest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# This file is part of arduino-cli.
2-
#
2+
33
# Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
4-
#
4+
55
# This software is released under the GNU General Public License version 3,
66
# which covers the main part of arduino-cli.
77
# The terms of this license can be found at:
88
# https://www.gnu.org/licenses/gpl-3.0.en.html
9-
#
9+
1010
# You can be released from the requirements of the above licenses by purchasing
1111
# a commercial license. Buying such a license is mandatory if you want to modify or
1212
# otherwise use the software for commercial activities involving the Arduino
@@ -48,15 +48,15 @@ def working_dir(tmpdir_factory):
4848

4949

5050
@pytest.fixture(scope="function")
51-
def run_command(data_dir, downloads_dir, working_dir):
51+
def run_command(pytestconfig, data_dir, downloads_dir, working_dir):
5252
"""
5353
Provide a wrapper around invoke's `run` API so that every test
5454
will work in the same temporary folder.
5555
5656
Useful reference:
5757
http://docs.pyinvoke.org/en/1.2/api/runners.html#invoke.runners.Result
5858
"""
59-
cli_path = os.path.join(pytest.config.rootdir, "..", "arduino-cli")
59+
cli_path = os.path.join(pytestconfig.rootdir, "..", "arduino-cli")
6060
env = {
6161
"ARDUINO_DATA_DIR": data_dir,
6262
"ARDUINO_DOWNLOADS_DIR": downloads_dir,

Diff for: test/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ astroid==2.2.5
22
atomicwrites==1.3.0
33
attrs==19.1.0
44
importlib-metadata==0.18
5-
invoke==1.3.0
5+
git+https://github.com/flazzarini/invoke.git
66
isort==4.3.21
77
lazy-object-proxy==1.4.1
88
mccabe==0.6.1
@@ -13,7 +13,7 @@ pluggy==0.12.0
1313
py==1.8.0
1414
pylint==2.3.1
1515
pyparsing==2.4.0
16-
pytest==5.0.1
16+
pytest==5.1.3
1717
semver==2.8.1
1818
simplejson==3.16.0
1919
six==1.12.0

Diff for: test/test_compile.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# This file is part of arduino-cli.
2-
#
2+
33
# Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
4-
#
4+
55
# This software is released under the GNU General Public License version 3,
66
# which covers the main part of arduino-cli.
77
# The terms of this license can be found at:
88
# https://www.gnu.org/licenses/gpl-3.0.en.html
9-
#
9+
1010
# You can be released from the requirements of the above licenses by purchasing
1111
# a commercial license. Buying such a license is mandatory if you want to modify or
1212
# otherwise use the software for commercial activities involving the Arduino
1313
# software without disclosing the source code of your own applications. To purchase
1414
# a commercial license, send an email to [email protected].
15+
import pytest
1516
import json
1617
import os
17-
import pytest
1818

1919
from .common import running_on_ci
2020

@@ -124,7 +124,7 @@ def test_compile_and_compile_combo(run_command, data_dir):
124124

125125
# Build sketch for each detected board
126126
for board in detected_boards:
127-
log_file_name = "{fqbn}-compile.log".format(fqbn=board.get('fqbn'))
127+
log_file_name = "{fqbn}-compile.log".format(fqbn=board.get('fqbn').replace(":", "-"))
128128
log_file_path = os.path.join(data_dir, log_file_name)
129129
command_log_flags = "--log-format json --log-file {} --log-level trace".format(log_file_path)
130130
result = run_command("compile -b {fqbn} --upload -p {address} {sketch_path} {log_flags}".format(

0 commit comments

Comments
 (0)