Skip to content

Commit d7f95b0

Browse files
committed
more handling of stdout
1 parent bb4b9dd commit d7f95b0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

exe/arduino_ci_remote.rb

+11-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,17 @@ def assure(message, &block)
9292
board = all_platforms[p][:board]
9393
assure("Switching to board for #{p} (#{board})") { @arduino_cmd.use_board(board) }
9494
example_name = File.basename(example_path)
95-
attempt("Verifying #{example_name}") { @arduino_cmd.verify_sketch(example_path) }
95+
attempt("Verifying #{example_name}") do
96+
ret = @arduino_cmd.verify_sketch(example_path)
97+
unless ret
98+
puts "Last message: #{@arduino_cmd.last_msg}"
99+
puts "========== Stdout:"
100+
puts @arduino_cmd.last_out
101+
puts "========== Stderr:"
102+
puts @arduino_cmd.last_err
103+
end
104+
ret
105+
end
96106
end
97107
end
98108

lib/arduino_ci/arduino_cmd.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ def verify_sketch(path)
211211
@last_msg = "Can't verify Sketch at nonexistent path '#{path}'!"
212212
return false
213213
end
214-
run(flag_verify, path, err: :out)
214+
ret = run_and_capture(flag_verify, path)
215+
ret[:success]
215216
end
216217

217218
# ensure that the given library is installed, or symlinked as appropriate

0 commit comments

Comments
 (0)