Skip to content

Suggested fixes #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a50d8a1
Increase clarity of command line tool
ianfixes Oct 16, 2020
4f6eb2a
Use proper 1.5 library format
ianfixes Oct 19, 2020
9b4f31f
Obey 1.0 / 1.5 library specification when finding C++ library source
ianfixes Oct 19, 2020
09b8cc2
Appease rubocop
ianfixes Oct 19, 2020
8a14ad1
avoid error when testing for membership in a nonexistent directory
ianfixes Oct 19, 2020
082ac95
Add library.properties parsing
ianfixes Oct 27, 2020
da1cef6
Add recursive library dependency compilation
ianfixes Oct 27, 2020
c2302ec
Fix unit tests for source directory exclusion
ianfixes Oct 27, 2020
34aa9f9
reorder changelog sections
ianfixes Oct 27, 2020
14a551b
Fix _SFR_IO8 macro definition -- use volatile keyword to prevent opti…
ianfixes Oct 27, 2020
2af1a4c
Add dummy test files to sample projects to ensure they aren't include…
ianfixes Oct 27, 2020
be95d0c
Print unit test stack traces if encountered
ianfixes Oct 27, 2020
42bc4fe
Show current platform while running unittests
matthijskooijman Aug 25, 2020
7d7d810
Make SPI.h work on non-AVR unittests
matthijskooijman Aug 25, 2020
2297661
Do not include SPI/Wire from Arduino.h
matthijskooijman Aug 26, 2020
97a499c
Complete and fix defines for various boards
matthijskooijman Aug 25, 2020
6bfa32c
Only include avr/io.h if __AVR__ is defined
matthijskooijman Aug 26, 2020
c4c753c
Allow specifying NUM_SERIAL_PORTS explicitly
matthijskooijman Aug 26, 2020
9eab3cd
Specify NUM_SERIAL_PORTS for non-AVR targets
matthijskooijman Aug 26, 2020
77d8737
Fix pgm_read_ptr_near/far
matthijskooijman Aug 26, 2020
614ffec
Replace _P macros with inline functions
matthijskooijman Aug 26, 2020
1df3995
Mock stdio.h progmem functions
matthijskooijman Aug 26, 2020
a83cb63
Remove some functions from pgmspace.h that break on cygwin
matthijskooijman Nov 6, 2020
cb67e90
Annotate matthijskooijman changes
ianfixes Nov 11, 2020
583f4a1
Remove hard-coded __AVR__ in favor of platform configured data
ianfixes Nov 11, 2020
7978af6
Support for EEPROM (squashed)
Nov 11, 2020
4199092
Fix EEPROM compilation
ianfixes Nov 11, 2020
cdecc40
Add files needed to compile Ethernet library (squashed)
Nov 11, 2020
a8eff6a
Fix custom ethernet library location
ianfixes Nov 13, 2020
7804730
Implement __ARDUNO_CI_SFR_MOCK (squashed)
Nov 11, 2020
cbccf6a
Don't test SFR on non-AVR
ianfixes Nov 11, 2020
ebfa6a7
Additional __ARDUINO_CI_SFR_MOCK commits (squashed)
Nov 13, 2020
b4ee115
Remove possible unnecessary preprocessor guard
ianfixes Nov 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Print unit test stack traces if encountered
  • Loading branch information
ianfixes committed Nov 11, 2020
commit be95d0ca37abb540b2434be0c4fb8e44965627fc
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `LibraryProperties` to read metadata from Arduino libraries
- `CppLibrary.library_properties_path`, `CppLibrary.library_properties?`, `CppLibrary.library_properties` to expose library properties of a Cpp library
- `CppLibrary.arduino_library_dependencies` to list the dependent libraries specified by the library.properties file
- `CppLibrary.print_stack_dump` prints stack trace dumps (on Windows specifically) to the console if encountered

### Changed
- Move repository from https://github.com/ianfixes/arduino_ci to https://github.com/Arduino-CI/arduino_ci
Expand Down
21 changes: 19 additions & 2 deletions lib/arduino_ci/cpp_library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,31 @@ def build_for_test_with_configuration(test_file, aux_libraries, gcc_binary, ci_g
executable
end

# print any found stack dumps
# @param executable [Pathname] the path to the test file
def print_stack_dump(executable)
possible_dumpfiles = [
executable.sub_ext(executable.extname + ".stackdump")
]
possible_dumpfiles.select(&:exist?).each do |dump|
puts "========== Stack dump from #{dump}:"
File.foreach(dump) { |line| print " #{line}" }
end
end

# run a test file
# @param [Pathname] the path to the test file
# @param executable [Pathname] the path to the test file
# @return [bool] whether all tests were successful
def run_test_file(executable)
@last_cmd = executable
@last_out = ""
@last_err = ""
Host.run_and_output(executable.to_s.shellescape)
ret = Host.run_and_output(executable.to_s.shellescape)

# print any stack traces found during a failure
print_stack_dump(executable) unless ret

ret
end

end
Expand Down