@@ -45,6 +45,7 @@ def generate_expected_output(
4545 "" ,
4646 "arduino:avr:uno" ,
4747 "arduino:avr@1.8.3" ,
48+ [],
4849 "/dev/ttyACM0" ,
4950 '"{data_dir}/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude"' ,
5051 "{tool_executable} "
@@ -55,6 +56,7 @@ def generate_expected_output(
5556 "" ,
5657 "arduino:avr:leonardo" ,
5758 "arduino:avr@1.8.3" ,
59+ [],
5860 "/dev/ttyACM999" ,
5961 '"{data_dir}/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude"' ,
6062 "{tool_executable} "
@@ -65,6 +67,7 @@ def generate_expected_output(
6567 "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" ,
6668 "adafruit:avr:flora8" ,
6769 "adafruit:avr@1.4.13" ,
70+ ["arduino:avr@1.8.3" ],
6871 "/dev/ttyACM0" ,
6972 '"{data_dir}/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude"' ,
7073 "{tool_executable} "
@@ -75,6 +78,7 @@ def generate_expected_output(
7578 "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" ,
7679 "adafruit:avr:flora8" ,
7780 "adafruit:avr@1.4.13" ,
81+ ["arduino:avr@1.8.3" ],
7882 "/dev/ttyACM999" ,
7983 '"{data_dir}/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude"' ,
8084 "{tool_executable} "
@@ -85,6 +89,7 @@ def generate_expected_output(
8589 "https://dl.espressif.com/dl/package_esp32_index.json" ,
8690 "esp32:esp32:esp32thing" ,
8791 "esp32:esp32@1.0.6" ,
92+ [],
8893 "/dev/ttyACM0" ,
8994 {
9095 "linux" : 'python "{data_dir}/packages/esp32/tools/esptool_py/3.0.0/esptool.py"' ,
@@ -102,6 +107,7 @@ def generate_expected_output(
102107 "http://arduino.esp8266.com/stable/package_esp8266com_index.json" ,
103108 "esp8266:esp8266:generic" ,
104109 "esp8266:esp8266@3.0.1" ,
110+ [],
105111 "/dev/ttyACM0" ,
106112 '"{data_dir}/packages/esp8266/tools/python3/3.7.2-post1/python3"' ,
107113 "{tool_executable} "
@@ -113,9 +119,18 @@ def generate_expected_output(
113119]
114120
115121
116- @pytest .mark .parametrize ("package_index, fqbn, core, upload_port, upload_tools, output" , testdata )
122+ @pytest .mark .parametrize ("package_index, fqbn, core, deps, upload_port, upload_tools, output" , testdata )
117123def test_upload_sketch (
118- run_command , session_data_dir , downloads_dir , package_index , fqbn , core , upload_port , upload_tools , output
124+ run_command ,
125+ session_data_dir ,
126+ downloads_dir ,
127+ package_index ,
128+ fqbn ,
129+ core ,
130+ core_dependencies ,
131+ upload_port ,
132+ upload_tools ,
133+ output ,
119134):
120135 env = {
121136 "ARDUINO_DATA_DIR" : session_data_dir ,
@@ -130,6 +145,9 @@ def test_upload_sketch(
130145
131146 assert run_command (f"core install { core } " , custom_env = env )
132147
148+ for d in core_dependencies :
149+ assert run_command (f"core install { d } " , custom_env = env )
150+
133151 # Create a sketch
134152 sketch_name = "TestSketchForUpload"
135153 sketch_path = Path (session_data_dir , sketch_name )
0 commit comments