Commit Graph

27 Commits (36e29b4bed4c27911d1fb2f53b249bef354bf7cb)

Author SHA1 Message Date
Anna Bridge fc6ae4ba0f Update utest to use mbed-os version of critical_section.
This is an internal change only.
2016-06-10 17:50:14 +01:00
Anna Bridge bcebaa559f Renamed utest files to add a prefix of 'utest_' to prevent namespace
clashes.
It should be noted that the exceptions to this are unity_handler.cpp and
unity_handler.h as these deal with Unity/Utest interaction and should be
unique enough in the namespace.
2016-06-09 18:41:38 +01:00
Anna Bridge 774311d367 Add config file to utest to ensure UNITY_INCLUDE_CONFIG_H is always
defined.
This is required for Unity in order to ensure that unity_config.h is
included in builds.
2016-06-09 15:19:37 +01:00
Anna Bridge a70780fc12 Update greentea-client and Unity lib files to point to the latest library
version compatible with Utest.

Update lib git shas to correct format for Unity and Greentea libs
2016-06-09 15:19:27 +01:00
Anna Bridge 50f1c178e9 Review comments: Re-implemented utest_printf to use RawSerial.
Re-implemented utest_safe_putc() to use Rawserial.
Minor cosmetic changes.
2016-06-08 18:01:27 +01:00
Anna Bridge 0ccdfe3ca2 Updates to make utest thread safe and thus run when compiled with both gcc
and armcc.

1. Remove use of printf from all code that may be directly or indirectly
invoked from an interrupt context,

2. For occasions where a printf is required and the code in question may
run both inside and outside an interrupt context, add a new interrupt safe
version of printf, utest_printf(). This function will only pass its
arguments down to printf if interrupts are not disabled.

3. In harness.cpp, is_busy() , fix a bug where the function can return
leaving interrupts disabled.

4. In unity_handler.cpp add a new function, utest_safe_putc(), This is
used to override the default putc() function used by Unity. This version
checks that the current code does not have interrupts disabled prior to
outputting the character to the serial port. This overriding is enabled by
adding unity_config.h to the unity code and redefining UNITY_OUTPUT_CHAR
to utest_safe_putc(). The new config file is included in the build by
adding the define UNITY_INCLUDE_CONFIG_H. The Unity changes are submitted
under a separate PR. This change ensures that any Unity ASSERTS executed from
within interrupt context are safe.
2016-06-07 15:56:26 +01:00
Anna Bridge d4415eeeac Remove all printfs from test cases which may directly or indirectly run
from an interrupt context. Where required add flags to functions and check
the values in the case teardowns. This allows validation that the case
callback was invoked without the need for an ASSERT or printf directly in
the callback.
In cases where a printf is still required in a test case but it is unclear
whether the code may or may not get called from interrupt context, a new
printf alternative, utest_printf() should be used instead. This just
checks whether the code is executing in interrupt context and only passes
its arguments to printf if not.
2016-06-07 15:48:13 +01:00
Przemek Wirkus c27d51ab4f Add official repository for greentea-client to greentea-client.lib
Branched from greentea-client and released this in tag/v1.1.0_yotta_strip
2016-05-30 19:49:59 +01:00
Russ Butler 315a500b38 Merge pull request #145 from adbridge/armcc
Fix ARMCC compiler warning: Missing arg type.
2016-05-27 15:38:48 -05:00
Anna Bridge 5e58036974 Update the extern C decalaration. Add __cpluplus block to unity_handler.h
and include that header in unity_handler.cpp.
2016-05-27 14:48:32 +01:00
Marcus Shawcroft 2a456e5a58 Merge pull request #154 from adbridge/status_t_update
Update all instances of status_t in the unit tests to fully namespace…
2016-05-27 13:16:14 +01:00
Anna Bridge 635afa58fc Update all instances of status_t in the unit tests to fully namespace them
to utest::v1::status_t .
2016-05-27 11:59:25 +01:00
Martin Kojtal a80428a76c Merge pull request #147 from adbridge/unity_update
Updated Unity lib file in mbed-os to pick up the latest Unity library
2016-05-26 16:01:38 +01:00
Anna Bridge d230a6255e Updated Unity lib file in mbed-os to pick up the latest Unity library
(v3.0.0)
2016-05-26 13:59:07 +01:00
Anna Bridge 706e5a0473 Fix ARMCC compiler warning: Missing arg type. 2016-05-25 15:48:29 +01:00
Russ Butler 960941cb0a Add IAR support
Make the following changes for IAR support:
-define __deprecated_message for IAR
-fix python error in iar.py
-move variable length array in buffered serial from cpp file to c file.
    IAR only supports variable length arrays in c.
2016-05-24 14:37:14 -05:00
Anna Bridge 15e372f6ef Review comment:
Removed superfluous debug prints from harness.cpp.
2016-05-19 16:56:01 +01:00
Anna Bridge 710421d3e8 Code review rework:
Updated include files within tests to use subdirectory/header.h
Updated global variables within tests to be static
Fixed indentation issue.
Renamed Timeout class variables to be more meaningful
Moved definition of utest_trace into stack_trace.cpp
Removed unecessary call to .clear() method in utest_add_to_trace()
Changed UTEST_LOG_FUNCTION macro to UTEST_LOG_FUNCTION();
2016-05-19 16:56:00 +01:00
Anna Bridge 4cd34b1235 Port utest unit tests from Yotta / Minar based environment to Morpheus /
us ticker based environment
2016-05-19 16:51:00 +01:00
Anna Bridge 3de4514068 Added full namespacing to instances of status_t to prevent namespace
collisions with the same type in global C namespace.
2016-05-17 17:58:05 +01:00
Anna Bridge 878ce59fa3 Updated utest ticker scheduler to use the c++ Timeout class rather than
the C based function calls directly into ticker.
Added a software based backtrace functionality, plus utest instrumentation
using that functionality.
2016-05-13 14:09:55 +01:00
Martin Kojtal cfed344dda utest - fix backslash in the utest paths 2015-10-24 00:59:38 +01:00
Martin Kojtal 2c3ad57a32 utest - fix us ticker header file name 2016-04-28 15:58:08 -05:00
Martin Kojtal 8c9ebde801 utest - add mbed shim layer 2016-04-28 15:24:27 -05:00
Martin Kojtal 47390727e5 Add unity to frameworks 2016-04-28 15:15:52 -05:00
Russ Butler f23d6ce673 Add mirrored repos
Check in the mirrored repos
2016-04-10 23:37:22 -05:00
Brian Daniels b675e62aa5 Adding greentea-client library 2016-04-07 02:20:52 +01:00