@@ -292,18 +292,21 @@ def test_compile_with_esp8266_bundled_libraries(run_command, data_dir, copy_sket
292
292
assert "\n " .join (expected_output ) not in res .stdout
293
293
294
294
295
- def test_generate_compile_commands_json_with_esp32 (run_command , data_dir , copy_sketch ):
296
- # https://github.com/arduino/arduino-cli/issues/1547
295
+ def test_generate_compile_commands_json_resilience (run_command , data_dir , copy_sketch ):
297
296
assert run_command (["update" ])
298
297
299
- # Update index with esp32 core and install it
298
+ # check it didn't fail with [email protected] that has a prebuild hook that must run:
299
+ # https://github.com/arduino/arduino-cli/issues/1547
300
300
url = "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
301
301
assert run_command (["core" , "update-index" , f"--additional-urls={ url } " ])
302
302
assert run_command ([
"core" ,
"install" ,
"esp32:[email protected] " ,
f"--additional-urls={ url } " ])
303
-
304
303
sketch_path = copy_sketch ("sketch_simple" )
305
304
assert run_command (["compile" , "-b" , "esp32:esp32:featheresp32" , "--only-compilation-database" , sketch_path ])
306
305
306
+ # check it didn't fail on a sketch with a missing include
307
+ sketch_path = copy_sketch ("sketch_with_missing_include" )
308
+ assert run_command (["compile" , "-b" , "esp32:esp32:featheresp32" , "--only-compilation-database" , sketch_path ])
309
+
307
310
308
311
def test_compile_sketch_with_tpp_file_include (run_command , copy_sketch ):
309
312
assert run_command (["update" ])
0 commit comments