Skip to content

Commit 56fca8e

Browse files
Massimiliano Pippimasci
Massimiliano Pippi
authored andcommitted
skip problematic test on win
1 parent 7e24d48 commit 56fca8e

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

test/test_compile.py

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# a commercial license, send an email to license@arduino.cc.
1515
import json
1616
import os
17+
import platform
1718

1819
import pytest
1920

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

86-
# Test the --output flag defaulting to current working dir
87+
# Test extention won't be added if already present
8788
result = run_command(
88-
"compile -b {fqbn} {sketch_path} -o test".format(
89+
"compile -b {fqbn} {sketch_path} -o test2.hex".format(
8990
fqbn=fqbn, sketch_path=sketch_path
9091
)
9192
)
9293
assert result.ok
93-
assert os.path.exists(os.path.join(working_dir, "test.hex"))
94+
assert os.path.exists(os.path.join(working_dir, "test2.hex"))
9495

95-
# Test extention won't be added if already present
96+
97+
@pytest.mark.skipif(
98+
running_on_ci() and platform.system() == "Windows",
99+
reason="Test disabled on Github Actions Win VM until tmpdir inconsistent behavior bug is fixed",
100+
)
101+
def test_output_flag_default_path(run_command, data_dir, working_dir):
102+
# Init the environment explicitly
103+
result = run_command("core update-index")
104+
assert result.ok
105+
106+
# Download latest AVR
107+
result = run_command("core install arduino:avr")
108+
assert result.ok
109+
110+
# Create a test sketch
111+
sketch_path = os.path.join(data_dir, "test_output_flag_default_path")
112+
fqbn = "arduino:avr:uno"
113+
result = run_command("sketch new {}".format(sketch_path))
114+
assert result.ok
115+
116+
# Test the --output flag defaulting to current working dir
96117
result = run_command(
97-
"compile -b {fqbn} {sketch_path} -o test2.hex".format(
118+
"compile -b {fqbn} {sketch_path} -o test".format(
98119
fqbn=fqbn, sketch_path=sketch_path
99120
)
100121
)
101122
assert result.ok
102-
assert os.path.exists(os.path.join(working_dir, "test2.hex"))
123+
assert os.path.exists(os.path.join(working_dir, "test.hex"))
103124

104125

105126
def test_compile_with_sketch_with_symlink_selfloop(run_command, data_dir):

0 commit comments

Comments
 (0)