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 Jun 7, 2023
1 parent 15a3811 commit 59a89d8
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 @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Add util/atomic.h
- `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 @@ -542,11 +542,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 the free space of #{usage[:free]} is at least the desired minimum of #{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 59a89d8

Please # to comment.