Unverified Commit 373c9c09 authored by Roberto Sora's avatar Roberto Sora Committed by GitHub

Use patched invoke in e2e requirements (#423)

* Use patched invoke in e2e requirements

In order to overcome issue reported here
https://github.com/arduino/arduino-cli/pull/416
we used successfully this patch
https://github.com/pyinvoke/invoke/pull/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
parent afdf609a
......@@ -58,11 +58,6 @@ jobs:
architecture: 'x64'
- name: Run integration tests
# Since we are investigating issues emerged
# with python integration tests on windows
# this step is disabled for windows-2019
# platform ATM
if: matrix.operating-system != 'windows-2019'
run: |
pip install -r test/requirements.txt
task test-integration
......
......@@ -48,7 +48,7 @@ def working_dir(tmpdir_factory):
@pytest.fixture(scope="function")
def run_command(data_dir, downloads_dir, working_dir):
def run_command(pytestconfig, data_dir, downloads_dir, working_dir):
"""
Provide a wrapper around invoke's `run` API so that every test
will work in the same temporary folder.
......@@ -56,7 +56,7 @@ def run_command(data_dir, downloads_dir, working_dir):
Useful reference:
http://docs.pyinvoke.org/en/1.2/api/runners.html#invoke.runners.Result
"""
cli_path = os.path.join(pytest.config.rootdir, "..", "arduino-cli")
cli_path = os.path.join(pytestconfig.rootdir, "..", "arduino-cli")
env = {
"ARDUINO_DATA_DIR": data_dir,
"ARDUINO_DOWNLOADS_DIR": downloads_dir,
......
......@@ -2,7 +2,8 @@ astroid==2.2.5
atomicwrites==1.3.0
attrs==19.1.0
importlib-metadata==0.18
invoke==1.3.0
# temporary, replaces invoke==1.3.0 in favour of https://github.com/pyinvoke/invoke/pull/661
git+https://github.com/flazzarini/invoke.git
isort==4.3.21
lazy-object-proxy==1.4.1
mccabe==0.6.1
......@@ -13,7 +14,7 @@ pluggy==0.12.0
py==1.8.0
pylint==2.3.1
pyparsing==2.4.0
pytest==5.0.1
pytest==5.1.3
semver==2.8.1
simplejson==3.16.0
six==1.12.0
......
......@@ -14,6 +14,7 @@
# a commercial license, send an email to license@arduino.cc.
import json
import os
import pytest
from .common import running_on_ci
......@@ -124,7 +125,7 @@ def test_compile_and_compile_combo(run_command, data_dir):
# Build sketch for each detected board
for board in detected_boards:
log_file_name = "{fqbn}-compile.log".format(fqbn=board.get('fqbn'))
log_file_name = "{fqbn}-compile.log".format(fqbn=board.get('fqbn').replace(":", "-"))
log_file_path = os.path.join(data_dir, log_file_name)
command_log_flags = "--log-format json --log-file {} --log-level trace".format(log_file_path)
result = run_command("compile -b {fqbn} --upload -p {address} {sketch_path} {log_flags}".format(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment