Skip to content

Commit a333932

Browse files
committed
Fix improperly named libraries and add an explicit warning about it
1 parent 2b68e95 commit a333932

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
- Special handling of attempts to run the `arduino_ci.rb` CI script against the ruby library instead of an actual Arduino project
1111
- Explicit checks for attemping to test `arduino_ci` itself as if it were a library, resolving a minor annoyance to this developer.
1212
- Code coverage tooling
13+
- Explicit check and warning for library directory names that do not match our guess of what the library should/would be called
1314

1415
### Changed
1516
- Arduino backend is now `arduino-cli` version `0.13.0`
@@ -28,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2829
- `ARDUINO_CI_SKIP_SPLASH_SCREEN_RSPEC_TESTS` no longer affects any tests because there are no longer splash screens since switching to `arduino-cli`
2930

3031
### Fixed
32+
- Mismatches between library names in `library.properties` and the directory names, which can cause cryptic failures
3133

3234
### Security
3335

SampleProjects/ExcludeSomething/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name=TestSomething
1+
name=ExcludeSomething
22
version=0.1.0
33
author=Ian Katz <ianfixes@gmail.com>
44
maintainer=Ian Katz <ianfixes@gmail.com>

SampleProjects/NetworkLib/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name=Ethernet
1+
name=NetworkLib
22
version=0.1.0
33
author=James Foster <arduino@jgfoster.net>
44
maintainer=James Foster <arduino@jgfoster.net>

exe/arduino_ci.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,15 @@ def perform_example_compilation_tests(cpp_library, config)
375375
inform("Located arduino-cli binary") { @backend.binary_path.to_s }
376376

377377
# initialize library under test
378+
cpp_library_path = Pathname.new(".")
378379
cpp_library = assure("Installing library under test") do
379-
@backend.install_local_library(Pathname.new("."))
380+
@backend.install_local_library(cpp_library_path)
381+
end
382+
383+
assumed_name = @backend.name_of_library(cpp_library_path)
384+
ondisk_name = cpp_library_path.realpath.basename
385+
if assumed_name != ondisk_name
386+
inform("WARNING") { "Installed library named '#{assumed_name}' has directory name '#{ondisk_name}'" }
380387
end
381388

382389
if !cpp_library.nil?

0 commit comments

Comments
 (0)