Skip to content

Commit

Permalink
Fix improperly named libraries and add an explicit warning about it
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfixes committed Nov 25, 2020
1 parent 2b68e95 commit a333932
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Special handling of attempts to run the `arduino_ci.rb` CI script against the ruby library instead of an actual Arduino project
- Explicit checks for attemping to test `arduino_ci` itself as if it were a library, resolving a minor annoyance to this developer.
- Code coverage tooling
- Explicit check and warning for library directory names that do not match our guess of what the library should/would be called

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

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

### Security

Expand Down
2 changes: 1 addition & 1 deletion SampleProjects/ExcludeSomething/library.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=TestSomething
name=ExcludeSomething
version=0.1.0
author=Ian Katz <[email protected]>
maintainer=Ian Katz <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion SampleProjects/NetworkLib/library.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Ethernet
name=NetworkLib
version=0.1.0
author=James Foster <[email protected]>
maintainer=James Foster <[email protected]>
Expand Down
9 changes: 8 additions & 1 deletion exe/arduino_ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,15 @@ def perform_example_compilation_tests(cpp_library, config)
inform("Located arduino-cli binary") { @backend.binary_path.to_s }

# initialize library under test
cpp_library_path = Pathname.new(".")
cpp_library = assure("Installing library under test") do
@backend.install_local_library(Pathname.new("."))
@backend.install_local_library(cpp_library_path)
end

assumed_name = @backend.name_of_library(cpp_library_path)
ondisk_name = cpp_library_path.realpath.basename
if assumed_name != ondisk_name
inform("WARNING") { "Installed library named '#{assumed_name}' has directory name '#{ondisk_name}'" }
end

if !cpp_library.nil?
Expand Down

0 comments on commit a333932

Please sign in to comment.