All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add
__AVR__
to defines when compiling - Add support for
diditalPinToPort()
,digitalPinToBitMask()
, andportOutputRegister()
- Move repository from https://github.com/ianfixes/arduino_ci to https://github.com/Arduino-CI/arduino_ci
- Revise math macros to avoid name clashes
- Deprecated
arduino_ci_remote.rb
in favor ofarduino_ci.rb
- Don't define
ostream& operator<<(nullptr_t)
if already defined by Apple
0.3.0 - 2019-09-03
- Unit testing configuration now allows
exclude_dirs
to be set, which prevents stray source files from as part of unit testing allows
0.2.1 - 2019-08-12
- Minimal Wire mocks. Will not provide support for unit testing I2C communication yet, but will allow compilation of libraries that use I2C.
StreamTape
class now bridgesStream
andHardwareSerial
to allow general-purpose stream mocking & history
- Arduino command failures (to read preferences) now causes a fatal error, with help for troubleshooting the underlying command
- Arduino library dependencies are now installed prior to unit testing, instead of prior to compilation testing. Whoops.
- Arduino library dependencies with spaces in their names are now handled properly during compilation -- spaces are automatically coerced to underscores
0.2.0 - 2019-02-20
release-new-version.sh
script- outputs for
PinHistory
can now report timestamps - Fibonacci Clock for clock testing purposes (internal to this library)
- Shortened
ArduinoQueue
push and pop operations ci/Queue.h
is nowMockEventQueue.h
, with timing dataMockEventQueue::Node
now contains structMockEventQueue::Event
, which contains both the templated typeT
and a field for a timestamp.- Construction of
MockEventQueue
now includes a constructor argument for the time-fetching function - Construction of
PinHistory
now includes a constructor argument for the time-fetching function PinHistory
can now return an array of timestamps for its eventsGodmodeState
is now a singleton pattern, which is necessary to support the globality of Arduino functionsGodmodeState
now uses timestamped PinHistory for Analog and Digital
ArduinoQueue
no longer leaks memory
0.1.21 - 2019-02-07
- Proper
ostream operator <<
fornullptr
- Proper comparison operations fro
nullptr
Compare.h
heavily refactored to use a smallish macro
- Homegrown implementation of
nullptr
nullptr
support (again)
0.1.20 - 2019-01-31
unittest_setup()
andunittest_teardown()
were not being executed for each unit test, only for the set of all tests. My bad.
0.1.19 - 2019-01-30
- Added rspec sensitivity to the environment variable
$ARDUINO_CI_SELECT_CPP_TESTS=<glob>
(forarduino_ci
gem hackers) assertNotNull()
andassureNotNull()
C++ comparisons
CiConfig::allowable_unittest_files
now usesPathname
to full effectnullptr
now defined in its own class
- Assertions on
nullptr
- The defintion of
nullptr
0.1.18 - 2019-01-29
ArduinoInstallation
andArduinoDownloader
now allow console output to optionally be set to anIO
object of choice duringforce_install
ArduinoInstallation::force_install
now optionally accepts a version stringarduino_library_location.rb
script to print Arduino library location to stdoutarduino_ci_remote.rb
now supports--skip-unittests
and--skip-compilation
. If you skip both, only theautolocate!
of the Arduino binary will be performed.keepachangelog_manager
gem to begin streamlining the release processunittest_setup()
andunittest_teardown()
macros, my thanks to @hlovdal for contributing this code- Added rspec sensitivity to the environment variable
$ARDUINO_CI_SKIP_SPLASH_SCREEN_RSPEC_TESTS
(forarduino_ci
gem hackers) - Added rspec sensitivity to the environment variable
$ARDUINO_CI_SKIP_RUBY_RSPEC_TESTS
(forarduino_ci
gem hackers) - Added rspec sensitivity to the environment variable
$ARDUINO_CI_SKIP_CPP_RSPEC_TESTS
(forarduino_ci
gem hackers) nullptr
definition in C++assertNull()
for unit tests
- Unit tests and examples are now executed alphabetically by filename
- The
pgm_read_...
preprocessor macros in cpp/arduino/avr/pgmspace.h now expands to an expression with applicable type. - Unit tests for interrupts (
attachInterrupt
anddetachInterrupt
) get their own file
- Library installation no longer "fails" if the library is already installed
- Platform definition for
mega2560
now includes proper AVR compiler flag CppLibrary::vendor_bundle?
now asks where gems are, instead of assumingvendor/bundle/
install_local_library
step inarduino_ci_remote.rb
now properly surfaces any error message
0.1.17 - 2019-01-14
- Provide an
itoa
function. It is present in Arduino's runtime environment but not on most (all?) host systems because itoa is not a portable standard function. to_h
andto_s
functions forci_config.rb
CIConfig::clone
- Ability to override
CIConfig
from a hash instead of just a file arduino_ci_remote.rb
now supports command line switches--testfile-select=GLOB
and--testfile-reject=GLOB
(which can both be repeated)
- Simplified the use of
Array.each
with a return statement; it's now simplyArray.find
autolocate!
for Arduino installations now raisesArduinoInstallationError
ifforce_install
fails- Errors due to missing YAML are now named
ConfigurationError
- Determining a working OSX launch command no longer breaks on non-English installations
arduino_ci_remote.rb
now honors selected and rejected test files
0.1.16 - 2019-01-06
- Finally put some factorization into the
arduino_ci_remote.rb
script: testing unit and testing compilation are now standalone functions
- Unnecessary board changes during unit tests no longer happen
- Proper casting for
pgm_read_byte
0.1.15 - 2019-01-04
- Checking for (empty) set of platforms to build now precedes the check for examples to build; this avoids assuming that all libraries will have an example and dumping the file set when none are found
- Spaces in the names of project directores no longer cause unit test binaries to fail execution
- Configuration file overrides with
nil
s (or empty arrays) now properly override their base configuration
0.1.14 - 2018-09-21
- Arduino command wrapper now natively supports board manager URLs
arduino_ci_remote.rb
checks for proper board manager URLs for requested platformsarduino_ci_remote.rb
reports on Arduino executable location- exposed
index_libraries
inArduinoCmd
so it can be used as an explicit build step
- Centralized file listing code in
arduino_ci_remote.rb
arduino_ci_remote.rb
is verbose about platforms, packages, and URLs
- Linux wrapper no longer bails out on long-running commands. That behavior was possible in Arduino 1.6.x that might pop up a graphical error message, but with the display manager removed this is no longer a concern
0.1.13 - 2018-09-19
arduino_ci_remote.rb
now iterates over example platforms before examples (saves time)
arduino_ci_remote.rb
no longer crashes iftest/
directory doesn't exist
0.1.12 - 2018-09-13
- Explicit
libasan
checking (reporting) in build script
- Test file
int main(){}
needed a CPP extension in order to properly compile - Fixed build script reporting for
inform()
when it returns a non-string value from its block - Don't count false returns from
inform()
blocks as failures
0.1.11 - 2018-09-13
- Explicit checks that the requested test platforms are defined in YML
- Arduino command wrapper can now guess whether a library is installed
- CPP library class now reaches into included Arduino libraries for source files
- SPI mocks
ensure_arduino_installation.rb
to allow custom libraries to be installed- Copy constructor for
ArduinoCITable
- Some error information on failures to download the Arduino binary
- Refactored documentation
- External libraries aren't forcibly installed via the Arduino binary (in
arduino_cmd_remote.rb
) if they appear to exist on disk already attachInterrupt
anddetachInterrupt
are now mocked instead of_NOP
- Unit test binaries now run with debugging symbols and address sanitization (if available), to help isolate the causes of segfaults
ArduinoCommand::libdir
logic is now centralized, usingsketchbook.path
from prefs instead of hard-coding
- Display Manager became no longer necessary with Arduino 1.8.X
- OSX splash screen re-disabled
- ArduinoCITable didn't initialize its size on
clear()
- CPP file aggregation now ignores dotfiles
- Unit test
compilers
section of YAML configuration is now properly inherited from parent configuration files - Retrieving preferences is now properly cached
- Paths on Windows should now work due to the use of
Pathname
- symlinking directories in Windows environments now properly uses
/D
switch tomklink
0.1.10 - 2018-05-06
- Arduino
force_install
on Linux now attempts downloading 3 times and provides more information on failure - Explicit check for
wget
- Windows / Appveyor support, enabled largely by contributions from @tomduff
long long
support inString
- Representative
.gitignore
files in sample projects - Cross-platform symlinking in
Host
- OSX CI via Travis, with separate badges
- Author
- Splash-screen-skip hack on OSX now falls back on "official" launch method if the hack doesn't work
- Refactored download/install code in prepration for windows CI
- Explicitly use 32-bit math for mocked Random()
- Ruby-centric download and unzipping of Arduino IDE packages, now with progress dots
ArduinoDownloaderPosix
became empty, so it was removed
Gemfile.lock
files are properly ignored- Windows hosts won't try to open a display manager
isnan
portability- OSX force_install
0.1.9 - 2018-04-12
- Explicit tests of
.arduino-ci.yml
inTestSomething
example
- Malformed YAML (duplicate unittests section) now has no duplicate section
- arduino_ci_remote.rb script now has correct arguments in build_for_test_with_configuration
0.1.8 - 2018-04-03
- Definition of
LED_BUILTIN
, first reported bydfrencham
on GitHub - Stubs for
tone
andnoTone
, first suggested bydfrencham
on GitHub - Ability to specify multiple compilers for unit testing
- Compile errors / portability issues in
WString.h
andPrint.h
, first reported bydfrencham
on GitHub - Compile errors / inheritance issues in
Print.h
andStream.h
, first reported bydfrencham
on GitHub - Print functions for int, double, long, etc
0.1.7 - 2018-03-07
- Queue and Table are now ArduinoCIQueue and ArduinoCITable to avoid name collisions
0.1.6 - 2018-03-07
CppLibrary
can now reportgcc_version
arduino_ci_remote.rb
now formats tasks with multiple output lines more nicely- Templates for CI classes are now pass-by-value (no const reference)
- Replaced pipes with
Open3.capture3
to avoid deadlocks when commands have too much output ci_config.rb
now returns empty arrays (instead of nil) for undefined config keyspgmspace.h
explictly includes<string.h>
__FlashStringHelper
should now be properly mocked for compilationWString.h
bool operator now works and is simpler
0.1.5 - 2018-03-05
- Yaml files can have either
.yml
or.yaml
extensions - Yaml files support select/reject critera for paths of unit tests for targeted testing
- Pins now track history and can report it in Ascii (big- or little-endian) for digital sequences
- Pins now accept an array (or string) of input bits for providing pin values across multiple reads
- FlashStringHelper (and related macros) compilation mocks
- SoftwareSerial. That took a while.
- Queue template implementation
- Table template implementation
- ObservableDataStream and DataStreamObserver pattern implementation
- DeviceUsingBytes and implementation of mocked serial device
- Unit test executables print to STDERR just in case there are segfaults. Uh, just in case I ever write any.
- OSX no longer experiences
javax.net.ssl.SSLKeyException: RSA premaster secret error
messages when downloading board package files arduino_ci_remote.rb
no longer makes unnecessary changes to the board being tested- Scripts no longer crash if there is no
test/
directory - Scripts no longer crash if there is no
examples/
directory assureTrue
andassureFalse
nowassure
instead of justassert
ing.
0.1.4 - 2018-02-01
- Support for all builtin Math functions https://www.arduino.cc/reference/en/
- Support for all builtin Bits and Bytes functions https://www.arduino.cc/reference/en/
- Support for GODMODE and time functions
- Support for Character functions https://www.arduino.cc/reference/en/
- Mocks for
random
functions with seed control - Many original Arduino
#define
s - Mocks for pinMode, analog/digital read/write
- Support for WString
- Support for Print
- Support for Stream (backed by a String implementation)
- All the IO stuff (pins, serial port support flags, etc) from the Arduino library
- Support for Serial (backed by GODMODE)
- Made
wget
have quieter output
0.1.3 - 2018-01-25
- C++ functions for
assure
;assert
s will run tests and continue,assure
s will abort on failures - Missing dotfiles in the
DoSomething
project have been committed
arduino_ci_remote.rb
doesn't attempt to set URLs if nothing needs to be downloadedarduino_ci_remote.rb
does unit tests firstunittest_main()
is now the macro for theint main()
of test files
- All test files were reporting "not ok" in TAP output. Now they are OK iff all asserts pass.
- Directories with a C++ extension in their name could cause problems. Now they are ignored.
CppLibrary
had trouble with symlinks. It shoudn't anymore.CppLibrary
had trouble with vendor bundles. It might in the future, but I have a better fix ready to go if it's an issue.
0.1.2 - 2018-01-25
- Actually package CPP and YAML files into the gem. Whoops.
0.1.1 - 2018-01-24
- README documentation for the actual unit tests
0.1.0 - 2018-01-24
- Unit testing support
- Documentation for all Ruby methods
ArduinoInstallation
class for managing lib / executable pathsDisplayManager
class for managing Xvfb instance if neededArduinoCmd
captures and caches preferencesArduinoCmd
reports on whether a board is installedArduinoCmd
sets preferencesArduinoCmd
installs boardsArduinoCmd
installs librariesArduinoCmd
selects boards (compiler preference)ArduinoCmd
verifies sketchesCppLibrary
manages GCC for unittestsCIConfig
manages overridable config for all testing
DisplayManger.with_display
doesn'tdisable
if the display was enabled prior to starting the block
- Built gems are
.gitignore
d - Updated gems based on Github's security advisories
0.0.1 - 2018-01-10
- Skeleton for gem with working unit tests