Skip to content

Commit 6e375d8

Browse files
committed
Added tests
1 parent 0ee1c67 commit 6e375d8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Diff for: test/test_compile_part_4.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,21 @@ def test_compile_with_esp8266_bundled_libraries(run_command, data_dir, copy_sket
292292
assert "\n".join(expected_output) not in res.stdout
293293

294294

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):
297296
assert run_command(["update"])
298297

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
300300
url = "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
301301
assert run_command(["core", "update-index", f"--additional-urls={url}"])
302302
assert run_command(["core", "install", "esp32:[email protected]", f"--additional-urls={url}"])
303-
304303
sketch_path = copy_sketch("sketch_simple")
305304
assert run_command(["compile", "-b", "esp32:esp32:featheresp32", "--only-compilation-database", sketch_path])
306305

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+
307310

308311
def test_compile_sketch_with_tpp_file_include(run_command, copy_sketch):
309312
assert run_command(["update"])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "akdshfgdfkgweriuweriyuiqwuegdhsgfsdkfgyuawetrkdshfdsufg.h"

0 commit comments

Comments
 (0)