14
14
# a commercial license, send an email to [email protected] .
15
15
import json
16
16
import os
17
+ import platform
17
18
18
19
import pytest
19
20
@@ -83,6 +84,26 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
83
84
assert result .ok
84
85
assert os .path .exists (target )
85
86
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
+
86
107
# Test the --output flag defaulting to current working dir
87
108
result = run_command (
88
109
"compile -b {fqbn} {sketch_path} -o test" .format (
@@ -92,7 +113,7 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
92
113
assert result .ok
93
114
assert os .path .exists (os .path .join (working_dir , "test.hex" ))
94
115
95
- # Test extention won't be added if already present
116
+ # Test extension won't be added if already present
96
117
result = run_command (
97
118
"compile -b {fqbn} {sketch_path} -o test2.hex" .format (
98
119
fqbn = fqbn , sketch_path = sketch_path
0 commit comments