@@ -1155,3 +1155,33 @@ def test_compile_sketch_with_ipp_file_include(run_command, copy_sketch):
1155
1155
fqbn = "arduino:avr:uno"
1156
1156
1157
1157
assert run_command (f"compile -b { fqbn } { sketch_path } --verbose" )
1158
+
1159
+
1160
+ def test_compile_with_relative_build_path (run_command , data_dir , copy_sketch ):
1161
+ assert run_command ("update" )
1162
+
1163
+ run_command (
"core install arduino:[email protected] " )
1164
+
1165
+ sketch_name = "sketch_simple"
1166
+ sketch_path = copy_sketch (sketch_name )
1167
+ fqbn = "arduino:avr:uno"
1168
+
1169
+ build_path = Path (".." , "build_path" )
1170
+ working_dir = Path (data_dir , "working_dir" )
1171
+ working_dir .mkdir ()
1172
+ assert run_command (f"compile -b { fqbn } --build-path { build_path } { sketch_path } -v" , custom_working_dir = working_dir )
1173
+
1174
+ absolute_build_path = Path (data_dir , "build_path" )
1175
+ built_files = [f .name for f in absolute_build_path .glob ("*" )]
1176
+ assert f"{ sketch_name } .ino.eep" in built_files
1177
+ assert f"{ sketch_name } .ino.elf" in built_files
1178
+ assert f"{ sketch_name } .ino.hex" in built_files
1179
+ assert f"{ sketch_name } .ino.with_bootloader.bin" in built_files
1180
+ assert f"{ sketch_name } .ino.with_bootloader.hex" in built_files
1181
+ assert "build.options.json" in built_files
1182
+ assert "compile_commands.json" in built_files
1183
+ assert "core" in built_files
1184
+ assert "includes.cache" in built_files
1185
+ assert "libraries" in built_files
1186
+ assert "preproc" in built_files
1187
+ assert "sketch" in built_files
0 commit comments