Skip to content

Commit 373c9c0

Browse files
author
Roberto Sora
authored
Use patched invoke in e2e requirements (#423)
* 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 * add intend and cosmetics to header * add comment to describe patch replace to test/requirements.txt
1 parent afdf609 commit 373c9c0

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -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

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ 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+
# temporary, replaces invoke==1.3.0 in favour of https://github.com/pyinvoke/invoke/pull/661
6+
git+https://github.com/flazzarini/invoke.git
67
isort==4.3.21
78
lazy-object-proxy==1.4.1
89
mccabe==0.6.1
@@ -13,7 +14,7 @@ pluggy==0.12.0
1314
py==1.8.0
1415
pylint==2.3.1
1516
pyparsing==2.4.0
16-
pytest==5.0.1
17+
pytest==5.1.3
1718
semver==2.8.1
1819
simplejson==3.16.0
1920
six==1.12.0

Diff for: test/test_compile.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# a commercial license, send an email to [email protected].
1515
import json
1616
import os
17+
1718
import pytest
1819

1920
from .common import running_on_ci
@@ -124,7 +125,7 @@ def test_compile_and_compile_combo(run_command, data_dir):
124125

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

0 commit comments

Comments
 (0)