diff --git a/.drone.yml b/.drone.yml index 9c7df4ebe1c..cff5f148797 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/test/test_main.py b/test/test_main.py index 228a5071514..66b165d041c 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -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 @@ -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 @@ -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