Skip to content

Commit 55859ad

Browse files
authored
[skip changelog] Pin platform versions used in integration tests (#879)
This prevents spurious test breakage caused by platform releases. These tests are about the behavior of Arduino CLI itself, not about testing the platform, so the platform should be static. There are certain tests which make sense to do with the latest release of the platforms, and those have been left as is.
1 parent 678a48b commit 55859ad

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

test/test_compile.py

+15-13
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def test_compile_without_fqbn(run_command):
2626
result = run_command("core update-index")
2727
assert result.ok
2828

29-
# Download latest AVR
30-
result = run_command("core install arduino:avr")
29+
# Install Arduino AVR Boards
30+
result = run_command("core install arduino:avr@1.8.3")
3131
assert result.ok
3232

3333
# Build sketch without FQBN
@@ -92,8 +92,8 @@ def test_output_flag_default_path(run_command, data_dir, working_dir):
9292
result = run_command("core update-index")
9393
assert result.ok
9494

95-
# Download latest AVR
96-
result = run_command("core install arduino:avr")
95+
# Install Arduino AVR Boards
96+
result = run_command("core install arduino:avr@1.8.3")
9797
assert result.ok
9898

9999
# Create a test sketch
@@ -114,8 +114,8 @@ def test_compile_with_sketch_with_symlink_selfloop(run_command, data_dir):
114114
result = run_command("core update-index")
115115
assert result.ok
116116

117-
# Download latest AVR
118-
result = run_command("core install arduino:avr")
117+
# Install Arduino AVR Boards
118+
result = run_command("core install arduino:avr@1.8.3")
119119
assert result.ok
120120

121121
sketch_name = "CompileIntegrationTestSymlinkSelfLoop"
@@ -168,8 +168,8 @@ def test_compile_and_upload_combo(run_command, data_dir, detected_boards):
168168
assert result.ok
169169

170170
# Install required core(s)
171-
result = run_command("core install arduino:avr")
172-
result = run_command("core install arduino:samd")
171+
result = run_command("core install arduino:avr@1.8.3")
172+
result = run_command("core install arduino:samd@1.8.7")
173173
assert result.ok
174174

175175
# Create a test sketch
@@ -228,8 +228,8 @@ def test_compile_blacklisted_sketchname(run_command, data_dir):
228228
result = run_command("core update-index")
229229
assert result.ok
230230

231-
# Download latest AVR
232-
result = run_command("core install arduino:avr")
231+
# Install Arduino AVR Boards
232+
result = run_command("core install arduino:avr@1.8.3")
233233
assert result.ok
234234

235235
sketch_name = "RCS"
@@ -251,11 +251,13 @@ def test_compile_without_precompiled_libraries(run_command, data_dir):
251251
url = "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"
252252
result = run_command("core update-index --additional-urls={}".format(url))
253253
assert result.ok
254-
result = run_command("core install arduino:mbed --additional-urls={}".format(url))
254+
# arduino:mbed 1.1.5 is incompatible with the Arduino_TensorFlowLite library
255+
# see: https://github.com/arduino/ArduinoCore-nRF528x-mbedos/issues/93
256+
result = run_command("core install arduino:[email protected] --additional-urls={}".format(url))
255257
assert result.ok
256-
result = run_command("core install arduino:samd --additional-urls={}".format(url))
258+
result = run_command("core install arduino:samd@1.8.7 --additional-urls={}".format(url))
257259
assert result.ok
258-
result = run_command("core install adafruit:samd --additional-urls={}".format(url))
260+
result = run_command("core install adafruit:samd@1.6.0 --additional-urls={}".format(url))
259261
assert result.ok
260262

261263
# Install pre-release version of Arduino_TensorFlowLite (will be officially released

test/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_core_install_esp32(run_command, data_dir):
107107
url = "https://dl.espressif.com/dl/package_esp32_index.json"
108108
assert run_command("core update-index --additional-urls={}".format(url))
109109
# install 3rd-party core
110-
assert run_command("core install esp32:esp32 --additional-urls={}".format(url))
110+
assert run_command("core install esp32:esp32@1.0.4 --additional-urls={}".format(url))
111111
# create a sketch and compile to double check the core was successfully installed
112112
sketch_path = os.path.join(data_dir, "test_core_install_esp32")
113113
assert run_command("sketch new {}".format(sketch_path))

0 commit comments

Comments
 (0)