Skip to content

Commit 659cb17

Browse files
committed
Abandon library.properties scanning in favor of arduino-lint tool
1 parent 498f6e7 commit 659cb17

File tree

3 files changed

+1
-40
lines changed

3 files changed

+1
-40
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616
### Deprecated
1717

1818
### Removed
19+
- scanning of `library.properties`; this can and should now be performed by the standalone [`arduino-lint` tool](https://arduino.github.io/arduino-lint).
1920

2021
### Fixed
2122
- Example sketches with no configured platforms were printing the wrong configuration values to the debug message

REFERENCE.md

-5
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ If set, testing will fail if no unit test files are detected (or if the director
6464
If set, testing will fail if no example sketches are detected. This is to avoid communicating a passing status in cases where a commit may have accidentally moved or deleted the examples.
6565

6666

67-
### `SKIP_LIBRARY_PROPERTIES` environment variable
68-
69-
If set, testing will skip validating `library.properties` entries. This is to work around any possible bugs in `arduino_ci`'s interpretation of what is "correct".
70-
71-
7267
## Indirectly Overriding Build Behavior (medium term use), and Advanced Options
7368

7469
For build behavior that you'd like to persist across commits (e.g. defining the set of platforms to test against, disabling a test that you expect to re-enable at some future point), a special configuration file called `.arduino-ci.yml` can be used. There are 3 places you can put them:

exe/arduino_ci.rb

-35
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
VAR_USE_SUBDIR = "USE_SUBDIR".freeze
1010
VAR_EXPECT_EXAMPLES = "EXPECT_EXAMPLES".freeze
1111
VAR_EXPECT_UNITTESTS = "EXPECT_UNITTESTS".freeze
12-
VAR_SKIP_LIBPROPS = "SKIP_LIBRARY_PROPERTIES".freeze
1312

1413
@failure_count = 0
1514
@passfail = proc { |result| result ? "✓" : "✗" }
@@ -22,7 +21,6 @@ def self.parse(options)
2221
output_options = {
2322
skip_unittests: false,
2423
skip_compilation: false,
25-
skip_library_properties: false,
2624
ci_config: {
2725
"unittest" => unit_config
2826
},
@@ -39,10 +37,6 @@ def self.parse(options)
3937
output_options[:skip_compilation] = p
4038
end
4139

42-
opts.on("--skip-library-properties", "Don't validate library.properties entries") do |p|
43-
output_options[:skip_compilation] = p
44-
end
45-
4640
opts.on("--testfile-select=GLOB", "Unit test file (or glob) to select") do |p|
4741
unit_config["testfiles"] ||= {}
4842
unit_config["testfiles"]["select"] ||= []
@@ -388,33 +382,6 @@ def choose_platform_set(config, reason, desired_platforms, library_properties)
388382
end
389383
end
390384

391-
# tests of sane library.properties values
392-
def perform_property_tests(cpp_library)
393-
phase("library.properties validation")
394-
return inform("Skipping library.properties tests") { "as requested via command line" } if @cli_options[:skip_library_properties]
395-
return inform("Skipping library.properties tests") { "as requested via environment" } unless ENV[VAR_SKIP_LIBPROPS].nil?
396-
return inform("Skipping library.properties tests") { "file not found" } unless cpp_library.library_properties?
397-
398-
props = cpp_library.library_properties
399-
400-
props.depends&.each do |l|
401-
assure("library.properties 'depends=' entry '#{l}' is available via the library manager") { @backend.library_available?(l) }
402-
end
403-
404-
# the IDE would add these entries to a sketch (as "#include <...>" lines), they are nothing to do with the compioler
405-
props.includes&.map(&:strip)&.map(&Pathname::method(:new))&.each do |f|
406-
if (cpp_library.path + f).exist?
407-
inform("library.properties 'includes=' entry found") { f }
408-
elsif (cpp_library.path + "src" + f).exist?
409-
inform("library.properties 'includes=' entry found") { Pathname.new("src") + f }
410-
else
411-
# this is if they want to "#include <math>" or something -- may or may not be valid! so just warn.
412-
warn("library.properties 'includes=' entry '#{f}' does not refer to a file in the library")
413-
end
414-
end
415-
416-
end
417-
418385
# Unit test procedure
419386
def perform_unit_tests(cpp_library, file_config)
420387
phase("Unit testing")
@@ -560,8 +527,6 @@ def perform_example_compilation_tests(cpp_library, config)
560527
end
561528
end
562529

563-
perform_property_tests(cpp_library)
564-
565530
install_arduino_library_dependencies(
566531
cpp_library.arduino_library_dependencies,
567532
"<#{ArduinoCI::CppLibrary::LIBRARY_PROPERTIES_FILE}>"

0 commit comments

Comments
 (0)