nuttx-apps/tests
2017-03-31 09:10:56 -06:00
..
docs Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
testing Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
tools Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
unity Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
unity_ramtest Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
unity_usrsock Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
Kconfig Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
Make.defs Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
Makefile Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00
README.txt Add Unity test framework with usrsock test-cases 2017-03-31 09:10:56 -06:00

README
^^^^^^

This folder hosts NuttX unit test framework source files.

INTRODUCTION
^^^^^^^^^^^^

NuttX unit test framework is based on Unity (https://github.com/ThrowTheSwitch/Unity).
The source code bears minimal changes and most of the additional functionality is brought
through the extension.

NUTTX-SPECIFIC ISSUES
^^^^^^^^^^^^^^^^^^^^^

Unity relies on setjmp/longjmp to be available, so a testcase can be aborted. While the
functionality exists in simulator builds, the hardware environment does not have it. To
provide the same baseline we run test bodies and other abortable parts in their own threads.
The main thread blocks until a spawn exits. Thus we create the same context as offered by
setjmp/longjmp.

RUNNING TESTS
^^^^^^^^^^^^^

Tests can be executed both in simulator and in the target. The test application can be built-in
into NSH or provide application entry point.

Test application supports command line interface:

    application [--list] [test [test...]]

        --list - Lists all available testcases from all included modules

Test is identified by its module name and function name.