Skip to content

Commit

Permalink
Explicit reporting of free bytes after compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfixes committed Jan 21, 2023
1 parent 769b9a8 commit 26f6d4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- `Logger` class to centralize CI runner script logging (in particular, indentation)
- Explicit reporting of free bytes after compilation

### Changed
- `arduino_ci.rb` uses new `Logger`
Expand Down
6 changes: 4 additions & 2 deletions exe/arduino_ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,13 @@ def perform_example_compilation_tests(cpp_library, config)
end
end

# reporting or enforcing of free space
usage = @backend.last_bytes_usage
@log.inform("Free space (bytes) after compilation") { usage[:free] }
next if @cli_options[:min_free_space].nil?

usage = @backend.last_bytes_usage
min_free_space = @cli_options[:min_free_space]
@log.attempt("Checking that free space of #{usage[:free]} is less than desired minimum #{min_free_space}") do
@log.attempt("Free space exceeds desired minimum #{min_free_space}") do
min_free_space <= usage[:free]
end
end
Expand Down

0 comments on commit 26f6d4f

Please sign in to comment.