-
-
Notifications
You must be signed in to change notification settings - Fork 405
Precompiled libraries: only select a folder if it contains files #1134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
silvanocerza
merged 5 commits into
arduino:master
from
facchinm:precompiled_only_choose_nonempty_dirs
Jan 18, 2021
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2cbd753
Precompiled libraries: only select a folder if it contains files
facchinm 39a1b2b
Restore precompiled tests
facchinm 13fa7de
slightly refactored directoryContainsFile function
cmaglie 2abe447
[skip changelog] Fix compile tests
silvanocerza e19b9ec
[skip changelog] Fix compile test
silvanocerza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,33 +181,26 @@ def test_compile_blacklisted_sketchname(run_command, data_dir): | |
assert result.ok | ||
|
||
|
||
@pytest.mark.skip() | ||
def test_compile_without_precompiled_libraries(run_command, data_dir): | ||
# Init the environment explicitly | ||
url = "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" | ||
result = run_command("core update-index --additional-urls={}".format(url)) | ||
assert result.ok | ||
# arduino:mbed 1.1.5 is incompatible with the Arduino_TensorFlowLite library | ||
# see: https://github.com/arduino/ArduinoCore-nRF528x-mbedos/issues/93 | ||
result = run_command("core install arduino:[email protected] --additional-urls={}".format(url)) | ||
result = run_command("core install arduino:[email protected] --additional-urls={}".format(url)) | ||
assert result.ok | ||
result = run_command("core install arduino:[email protected] --additional-urls={}".format(url)) | ||
assert result.ok | ||
result = run_command("core install adafruit:[email protected] --additional-urls={}".format(url)) | ||
assert result.ok | ||
|
||
# Install pre-release version of Arduino_TensorFlowLite (will be officially released | ||
# via lib manager after https://github.com/arduino/arduino-builder/issues/353 is in) | ||
import zipfile | ||
|
||
with zipfile.ZipFile("test/testdata/Arduino_TensorFlowLite.zip", "r") as zip_ref: | ||
zip_ref.extractall("{}/libraries/".format(data_dir)) | ||
result = run_command("lib install [email protected]") | ||
# Precompiled version of Arduino_TensorflowLite | ||
result = run_command("lib install [email protected]") | ||
assert result.ok | ||
result = run_command( | ||
"compile -b arduino:mbed:nano33ble {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/".format(data_dir) | ||
) | ||
assert result.ok | ||
# should work on adafruit too after https://github.com/arduino/arduino-cli/pull/1134 | ||
result = run_command( | ||
"compile -b adafruit:samd:adafruit_feather_m4 {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/".format( | ||
data_dir | ||
|
@@ -216,7 +209,7 @@ def test_compile_without_precompiled_libraries(run_command, data_dir): | |
assert result.ok | ||
|
||
# Non-precompiled version of Arduino_TensorflowLite | ||
result = run_command("lib install Arduino_TensorflowLite@1.15.0-ALPHA") | ||
result = run_command("lib install Arduino_TensorflowLite@2.1.0-ALPHA") | ||
assert result.ok | ||
result = run_command( | ||
"compile -b arduino:mbed:nano33ble {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/".format(data_dir) | ||
|
@@ -241,6 +234,12 @@ def test_compile_without_precompiled_libraries(run_command, data_dir): | |
) | ||
assert result.ok | ||
|
||
# USBBlaster library | ||
result = run_command('lib install "[email protected]"') | ||
assert result.ok | ||
result = run_command( | ||
"compile -b arduino:samd:mkrvidor4000 {}/libraries/USBBlaster/examples/USB_Blaster/".format(data_dir) | ||
) | ||
|
||
def test_compile_with_build_properties_flag(run_command, data_dir, copy_sketch): | ||
# Init the environment explicitly | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.