Skip to content

Skip tests we cannot run on Drone #309

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 2 commits into from
Jul 25, 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
1 change: 0 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ steps:

- name: integration
image: arduino/arduino-cli:drone-1.0
failure: ignore # work in progress, we know some tests will fail at the moment
commands:
- pip install -r test/requirements.txt
- task test-integration
Expand Down
9 changes: 7 additions & 2 deletions test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
from datetime import datetime


def running_on_ci():
val = os.getenv('APPVEYOR') or os.getenv('DRONE')
return val is not None


def test_command_help(run_command):
result = run_command('help')
assert result.ok
Expand Down Expand Up @@ -62,7 +67,7 @@ def test_command_lib_search(run_command):
assert number_of_libs == number_of_libs_from_json


@pytest.mark.skipif(os.getenv('APPVEYOR'), reason="Appveyor VMs have no serial ports")
@pytest.mark.skipif(running_on_ci(), reason="VMs have no serial ports")
def test_command_board_list(run_command):
result = run_command('core update-index')
assert result.ok
Expand All @@ -76,7 +81,7 @@ def test_command_board_list(run_command):
assert 'protocol_label' in port


@pytest.mark.skipif(os.getenv('APPVEYOR'), reason="Appveyor VMs have no serial ports")
@pytest.mark.skipif(running_on_ci(), reason="VMs have no serial ports")
def test_command_board_listall(run_command):
result = run_command('board listall')
assert result.ok
Expand Down