Skip to content

Commit 362cf15

Browse files
committed
* Report output from compile.
* Allow test for minimum free space.
1 parent 84d7ad4 commit 362cf15

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99
### Added
10+
- Show output from successful compile
11+
- `--min-free-space=N` command-line argument to fail if free space is below requred value
1012

1113
### Changed
1214
- Change 266 files from CRLF to LF.

exe/arduino_ci.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,18 @@ def perform_example_compilation_tests(cpp_library, config)
478478
board = ovr_config.platform_info[p][:board]
479479
attempt("Compiling #{example_name} for #{board}") do
480480
ret = @backend.compile_sketch(example_path, board)
481-
unless ret
482-
puts
481+
puts
482+
if ret
483+
output = @backend.last_msg
484+
puts output
485+
i = output.index("leaving")
486+
free_space = output[i + 8..-1].to_i()
487+
min_free_space = @cli_options[:min_free_space]
488+
if free_space < min_free_space
489+
puts "Free space of #{free_space} is less than minimum of #{min_free_space}"
490+
ret = false
491+
end
492+
else
483493
puts "Last command: #{@backend.last_msg}"
484494
puts @backend.last_err
485495
end

lib/arduino_ci/arduino_backend.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def compile_sketch(path, boardname)
164164
return false
165165
end
166166
ret = run_and_capture("compile", "--fqbn", boardname, "--warnings", "all", "--dry-run", path.to_s)
167+
@last_msg = ret[:out]
167168
ret[:success]
168169
end
169170

0 commit comments

Comments
 (0)