Skip to content

Use patched invoke in e2e requirements #423

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

Merged
merged 3 commits into from
Sep 24, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ 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.

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,
Expand Down
5 changes: 3 additions & 2 deletions test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment here stating this is temporary?

isort==4.3.21
lazy-object-proxy==1.4.1
mccabe==0.6.1
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# a commercial license, send an email to [email protected].
import json
import os

import pytest

from .common import running_on_ci
Expand Down Expand Up @@ -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(
Expand Down