Skip to content

Commit

Permalink
Merge pull request #68 from bxparks/develop
Browse files Browse the repository at this point in the history
merge v1.5.1 into master
  • Loading branch information
bxparks authored Jan 22, 2021
2 parents f437410 + 8051e80 commit 6d0b44e
Show file tree
Hide file tree
Showing 109 changed files with 285 additions and 280 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aunit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup
run: |
cd ..
git clone https://github.com/bxparks/UnixHostDuino
git clone https://github.com/bxparks/EpoxyDuino
- name: Verify examples
run: |
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

* Unreleased
* 1.5.1 (2021-01-21)
* Update UnixHostDuino 0.4 to EpoxyDuino 0.5.
* No functional change in this release.
* 1.5 (2021-01-18)
* Add support for STM32duino.
* Blacklist megaAVR boards due to incompatibility with new Arduino API.
Expand Down Expand Up @@ -30,7 +33,7 @@
* 1.3.1 (2019-07-31)
* Add `examples/AUnitPlatformIO` to verify that AUnit works on PlatformIO.
* Rename unitduino to UnixHostDuino and move to its own repository at
`https://github.com/bxparks/UnixHostDuino`.
`https://github.com/bxparks/EpoxyDuino`.
* Add UnixHostDuino Makefile to all unit tests.
* Support SAMD21 and ATmega2560 boards.
* Call `exit(1)` upon failure or timeout, `exit(0)` upon success when using
Expand Down
63 changes: 31 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Test](https://github.com/google/googletest/). The unit tests usually run on the
embedded controller which allows detection of architecture-specific problems.
But for faster development, many unit tests can be compiled and executed
natively on Linux or MacOS using the
[UnixHostDuino](https://github.com/bxparks/UnixHostDuino) companion project.
[EpoxyDuino](https://github.com/bxparks/EpoxyDuino) companion project.

AUnit is almost a drop-in replacement of ArduinoUnit with some advantages. AUnit
supports timeouts and test fixtures. It somtimes consumes 50% less flash memory
Expand All @@ -17,10 +17,10 @@ and Teensy platforms. Another companion project
[AUniter](https://github.com/bxparks/AUniter) project provides command line
tools to verify, upload and validate the unit tests to the microcontroller,
instead of having to go through the Arduino IDE. Both the AUniter and
UnixHostDuino tools can be used in a continuous integration system like Jenkins,
EpoxyDuino tools can be used in a continuous integration system like Jenkins,
or with [GitHub Actions](https://github.com/features/actions).

**Version**: 1.5 (2021-01-18)
**Version**: 1.5.1 (2021-01-21)

**Changelog**: [CHANGELOG.md](CHANGELOG.md)

Expand Down Expand Up @@ -65,12 +65,12 @@ or with [GitHub Actions](https://github.com/features/actions).
* [GoogleTest Adapter](#GoogleTestAdapter)
* [Command Line Tools](#CommandLineTools)
* [AUniter](#AUniter)
* [UnixHostDuino](#UnixHostDuino)
* [EpoxyDuino](#EpoxyDuino)
* [Continuous Integration](#ContinuousIntegration)
* [Arduino IDE/CLI + Cloud](#IdePlusCloud)
* [Arduino IDE/CLI + Jenkins](#IdePlusJenkins)
* [UnixHostDuino + Jenkins](#UnixHostDuinoPlusJenkins)
* [UnixHostDuino + Cloud (Recommmended)](#UnixHostDuinoPlusCloud)
* [EpoxyDuino + Jenkins](#EpoxyDuinoPlusJenkins)
* [EpoxyDuino + Cloud (Recommmended)](#EpoxyDuinoPlusCloud)
* [Tips](#Tips)
* [Debugging Assertions in Fixtures](#DebuggingFixtures)
* [Class Hierarchy](#ClassHierarchy)
Expand Down Expand Up @@ -113,7 +113,7 @@ local machine, and the unit tests can be monitored automatically.

Unit tests written using AUnit can often be compiled and executed natively on
Linux or MacOS using the
[UnixHostDuino](https://github.com/bxparks/UnixHostDuino) library. The output on
[EpoxyDuino](https://github.com/bxparks/EpoxyDuino) library. The output on
the `Serial` object is redirected to the `stdout` of the Unix host. This
provides another avenue for implementing continuous builds or integration.

Expand Down Expand Up @@ -1453,21 +1453,21 @@ copied from the `AUniter/README.md` file:
* upload the `Blink.ino` sketch and monitor the serial port using a
user-configurable terminal program (e.g. `picocom`) on `/dev/ttyUSB0`

<a name="UnixHostDuino"></a>
### UnixHostDuino
<a name="EpoxyDuino"></a>
### EpoxyDuino

Instead of running the unit tests on the actual microcontrollers themselves, you
can compile and execute AUnit unit tests natively on Linux or MacOS machines
using the UnixHostDuino (https://github.com/bxparks/UnixHostDuino) project.
UnixHostDuino provides a minimal Arduino programming environment that is usually
using the EpoxyDuino (https://github.com/bxparks/EpoxyDuino) project.
EpoxyDuino provides a minimal Arduino programming environment that is usually
sufficient to compile and run AUnit test units on the Unix host machine. It
relies on the native C++ compiler, GNU Make, and `Makefile` files for each
`*.ino` unit test like this:

```
APP_NAME := SampleTest
ARDUINO_LIBS := AUnit
include ../../../UnixHostDuino/UnixHostDuino.mk
include ../../../EpoxyDuino/EpoxyDuino.mk
```

The unit test is compiled into a binary (`SampleTest.out`) using the `make
Expand All @@ -1477,12 +1477,12 @@ $ make
$ ./SampleTest.out
```

Here are a few tips when writing unit tests to run under UnixHostDuino:
Here are a few tips when writing unit tests to run under EpoxyDuino:

**Delay(1000)**

For real Arduino boards, you get more reliable unit tests if you add a
`delay(1000)` at the start of the program. For UnixHostDuino, this is not
`delay(1000)` at the start of the program. For EpoxyDuino, this is not
necessary, so I recommend calling this only on real Arduino boards, like this:
```C++
void setup() {
Expand All @@ -1496,7 +1496,7 @@ void setup() {
On real Arduino boards, the unit test (or any program for that matter) never
terminates. The `loop()` function executes forever. On Linux or MacOS using
UnixHostDuino, the test program will terminate at the end through the
EpoxyDuino, the test program will terminate at the end through the
`exit()` function. If the tests are successful (i.e. passing or skipped), it
will call `exit(0)`. If there are any failing tests (i.e. failed or timed out),
it will call `exit(1)`.
Expand All @@ -1510,7 +1510,7 @@ system. At the infrastructure level, you can use either a system like
continuous integration system like [GitHub
Actions](https://github.com/features/actions). For each of those
infrastructures, you can choose to use the Arduino IDE or CLI build tools, or
you can use UnixHostDuino to compile and run against a Linux or MacOS
you can use EpoxyDuino to compile and run against a Linux or MacOS
environment.
The option matrix looks like this:
Expand All @@ -1532,7 +1532,7 @@ The option matrix looks like this:
+----------------+-------------------------+------------------------+
| | * verify execution on | * verify execution on |
| | Unix environment | Unix environment |
| UnixHostDuino | * faster than IDE/CLI | * simple setup and |
| EpoxyDuino | * faster than IDE/CLI | * simple setup and |
| | * complex setup and | maintenance |
| | and maintenance | * very fast |
| | * (unnecessary) | * (recommended) |
Expand Down Expand Up @@ -1567,25 +1567,25 @@ microcontroller. Perhaps for certain situations, running the unit tests on
actual hardware is a requirement. But for most people, I no longer recommend
this environment.
<a name="UnixHostDuinoPlusJenkins"></a>
### UnixHostDuino + Jenkins
<a name="EpoxyDuinoPlusJenkins"></a>
### EpoxyDuino + Jenkins
Once the Jenkins environment is up and running, I have verified that it is easy
to run the unit tests using UnixHostDuino, since it needs just a C++ compiler
to run the unit tests using EpoxyDuino, since it needs just a C++ compiler
and GNU Make. Things will compile and run a lot faster than using the Arduino
IDE/CLI. However, this combination suffers from the same problem of maintaining
the Jenkins environment. If the unit tests are running in an Unix environment
anyway, it seems far easier to just run them in the cloud. So I don't recommend
using this setup. Just use a cloud CI provider as described below.
<a name="UnixHostDuinoPlusCloud"></a>
### UnixHostDuino + Cloud (Recommended)
<a name="EpoxyDuinoPlusCloud"></a>
### EpoxyDuino + Cloud (Recommended)
A cloud-based continuous integration service like [GitHub
Actions](https://github.com/features/actions) is easy to setup for
UnixHostDuino. Often the C++ compiler and GNU `make` tools are already installed
EpoxyDuino. Often the C++ compiler and GNU `make` tools are already installed
in the Docker container used by the CI system. The only additional setup is
to install UnixHostDuino, AUnit and other dependent Arduino libraries.
to install EpoxyDuino, AUnit and other dependent Arduino libraries.
Here are some example YAML files for GitHub Actions:
* https://github.com/bxparks/AceTime/tree/develop/.github/workflows
Expand All @@ -1596,7 +1596,7 @@ Here are some example YAML files for GitHub Actions:
In the various `aunit_tests.yml` files, the `Setup` step installs the various
dependent libraries using the `git clone` command, for example:
```
git clone https://github.com/bxparks/UnixHostDuino
git clone https://github.com/bxparks/EpoxyDuino
git clone https://github.com/bxparks/AUnit
```
Expand All @@ -1606,11 +1606,11 @@ want the unit tests to run against the latest commits. However, for many others,
it is probably better to use the `master` branch because it contains the stable
releases:
```
git clone --branch master https://github.com/bxparks/UnixHostDuino
git clone --branch master https://github.com/bxparks/EpoxyDuino
git clone --branch master https://github.com/bxparks/AUnit
```
Using UnixHostDuino with a cloud CI provider (like GitHub Actions) is my
Using EpoxyDuino with a cloud CI provider (like GitHub Actions) is my
recommended configuration for running AUnit tests because it is easy to setup
and maintain and the tests run fast.
Expand Down Expand Up @@ -1886,18 +1886,17 @@ I used MacOS 10.13.3, Ubuntu 18.04, and Ubuntu 20.04 for most of my development.
<a name="Feedback"></a>
## Feedback and Support
If you find this library useful, consider starring this project on GitHub. The
stars will let me prioritize the more popular libraries over the less popular
ones.
If you have any questions, comments, bug reports, or feature requests, please
file a GitHub ticket instead of emailing me unless the content is sensitive.
(The problem with email is that I cannot reference the email conversation when
other people ask similar questions later.) I'd love to hear about how this
software and its documentation can be improved. I can't promise that I will
incorporate everything, but I will give your ideas serious consideration.
If you find this library useful, consider starring this project on GitHub. It is
usually the only feedback that I get from my users. Given limited time and
resources, the stars will let me prioritize the more popular libraries over the
less popular one.
<a name="Authors"></a>
## Authors
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "AUnit"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.5
PROJECT_NUMBER = 1.5.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 3 additions & 3 deletions docs/html/AUnitVerbose_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down Expand Up @@ -120,10 +120,10 @@
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memItemLeft" align="right" valign="top"><a id="a87cbb10969eff63f8ae66afc4e9457eb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;10500</td></tr>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;10501</td></tr>
<tr class="separator:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70ade1487f0d9d7172f24897cd0f2dd5"><td class="memItemLeft" align="right" valign="top"><a id="a70ade1487f0d9d7172f24897cd0f2dd5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION_STRING</b>&#160;&#160;&#160;&quot;1.5&quot;</td></tr>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION_STRING</b>&#160;&#160;&#160;&quot;1.5.1&quot;</td></tr>
<tr class="separator:a70ade1487f0d9d7172f24897cd0f2dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
Expand Down
6 changes: 3 additions & 3 deletions docs/html/AUnitVerbose_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down Expand Up @@ -122,8 +122,8 @@
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="TestMacros_8h.html">aunit/TestMacros.h</a>&quot;</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="comment">// Version format: xxyyzz == &quot;xx.yy.zz&quot;</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor">#define AUNIT_VERSION 10500</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor">#define AUNIT_VERSION_STRING &quot;1.5&quot;</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor">#define AUNIT_VERSION 10501</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor">#define AUNIT_VERSION_STRING &quot;1.5.1&quot;</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
6 changes: 3 additions & 3 deletions docs/html/AUnit_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down Expand Up @@ -120,10 +120,10 @@
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memItemLeft" align="right" valign="top"><a id="a87cbb10969eff63f8ae66afc4e9457eb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;10500</td></tr>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;10501</td></tr>
<tr class="separator:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70ade1487f0d9d7172f24897cd0f2dd5"><td class="memItemLeft" align="right" valign="top"><a id="a70ade1487f0d9d7172f24897cd0f2dd5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION_STRING</b>&#160;&#160;&#160;&quot;1.5&quot;</td></tr>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION_STRING</b>&#160;&#160;&#160;&quot;1.5.1&quot;</td></tr>
<tr class="separator:a70ade1487f0d9d7172f24897cd0f2dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
Expand Down
6 changes: 3 additions & 3 deletions docs/html/AUnit_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down Expand Up @@ -122,8 +122,8 @@
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="TestMacros_8h.html">aunit/TestMacros.h</a>&quot;</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="comment">// Version format: xxyyzz == &quot;xx.yy.zz&quot;</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#define AUNIT_VERSION 10500</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor">#define AUNIT_VERSION_STRING &quot;1.5&quot;</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#define AUNIT_VERSION 10501</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor">#define AUNIT_VERSION_STRING &quot;1.5.1&quot;</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
2 changes: 1 addition & 1 deletion docs/html/AssertMacros_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/AssertMacros_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/AssertVerboseMacros_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/AssertVerboseMacros_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Assertion_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Assertion_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/Compare_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AUnit
&#160;<span id="projectnumber">1.5</span>
&#160;<span id="projectnumber">1.5.1</span>
</div>
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
</td>
Expand Down
Loading

0 comments on commit 6d0b44e

Please sign in to comment.