Skip to content

Commit bb3c5f5

Browse files
Massimiliano Pippimasci
Massimiliano Pippi
authored andcommitted
skip problematic test on win
1 parent c6d730e commit bb3c5f5

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

Diff for: test/test_compile.py

+22-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# a commercial license, send an email to [email protected].
1515
import json
1616
import os
17+
import platform
1718

1819
import pytest
1920

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

87+
88+
@pytest.mark.skipif(
89+
running_on_ci() and platform.system() == "Windows",
90+
reason="Test disabled on Github Actions Win VM until tmpdir inconsistent behavior bug is fixed",
91+
)
92+
def test_output_flag_default_path(run_command, data_dir, working_dir):
93+
# Init the environment explicitly
94+
result = run_command("core update-index")
95+
assert result.ok
96+
97+
# Download latest AVR
98+
result = run_command("core install arduino:avr")
99+
assert result.ok
100+
101+
# Create a test sketch
102+
sketch_path = os.path.join(data_dir, "test_output_flag_default_path")
103+
fqbn = "arduino:avr:uno"
104+
result = run_command("sketch new {}".format(sketch_path))
105+
assert result.ok
106+
86107
# Test the --output flag defaulting to current working dir
87108
result = run_command(
88109
"compile -b {fqbn} {sketch_path} -o test".format(
@@ -92,7 +113,7 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
92113
assert result.ok
93114
assert os.path.exists(os.path.join(working_dir, "test.hex"))
94115

95-
# Test extention won't be added if already present
116+
# Test extension won't be added if already present
96117
result = run_command(
97118
"compile -b {fqbn} {sketch_path} -o test2.hex".format(
98119
fqbn=fqbn, sketch_path=sketch_path

Diff for: test/test_core.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# software without disclosing the source code of your own applications. To purchase
1414
# a commercial license, send an email to [email protected].
1515
import os
16-
16+
import platform
1717
import pytest
1818
import simplejson as json
1919

@@ -105,9 +105,13 @@ def test_core_updateindex_invalid_url(run_command):
105105
assert result.failed
106106

107107

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

0 commit comments

Comments
 (0)