Skip to content

Commit

Permalink
skip problematic test on win
Browse files Browse the repository at this point in the history
  • Loading branch information
Massimiliano Pippi authored and masci committed Jan 22, 2020
1 parent c6d730e commit bb3c5f5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
23 changes: 22 additions & 1 deletion test/test_compile.py
Expand Up @@ -14,6 +14,7 @@
# a commercial license, send an email to license@arduino.cc.
import json
import os
import platform

import pytest

Expand Down Expand Up @@ -83,6 +84,26 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
assert result.ok
assert os.path.exists(target)


@pytest.mark.skipif(
running_on_ci() and platform.system() == "Windows",
reason="Test disabled on Github Actions Win VM until tmpdir inconsistent behavior bug is fixed",
)
def test_output_flag_default_path(run_command, data_dir, working_dir):
# Init the environment explicitly
result = run_command("core update-index")
assert result.ok

# Download latest AVR
result = run_command("core install arduino:avr")
assert result.ok

# Create a test sketch
sketch_path = os.path.join(data_dir, "test_output_flag_default_path")
fqbn = "arduino:avr:uno"
result = run_command("sketch new {}".format(sketch_path))
assert result.ok

# Test the --output flag defaulting to current working dir
result = run_command(
"compile -b {fqbn} {sketch_path} -o test".format(
Expand All @@ -92,7 +113,7 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
assert result.ok
assert os.path.exists(os.path.join(working_dir, "test.hex"))

# Test extention won't be added if already present
# Test extension won't be added if already present
result = run_command(
"compile -b {fqbn} {sketch_path} -o test2.hex".format(
fqbn=fqbn, sketch_path=sketch_path
Expand Down
8 changes: 6 additions & 2 deletions test/test_core.py
Expand Up @@ -13,7 +13,7 @@
# software without disclosing the source code of your own applications. To purchase
# a commercial license, send an email to license@arduino.cc.
import os

import platform
import pytest
import simplejson as json

Expand Down Expand Up @@ -105,9 +105,13 @@ def test_core_updateindex_invalid_url(run_command):
assert result.failed


@pytest.mark.skipif(
platform.system() == "Windows",
reason="core fails with fatal error: bits/c++config.h: No such file or directory",
)
def test_core_install_esp32(run_command, data_dir):
# update index
url = "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
url = "https://dl.espressif.com/dl/package_esp32_index.json"
assert run_command("core update-index --additional-urls={}".format(url))
# install 3rd-party core
assert run_command("core install esp32:esp32 --additional-urls={}".format(url))
Expand Down

0 comments on commit bb3c5f5

Please sign in to comment.