Commit Graph

5876 Commits (d15cd7826ade05f28499c84fb4f5c5ae2da9fcc4)

Author SHA1 Message Date
Christopher Haster d15cd7826a Add Thread::join call for exiting threads without forceful termination
Allows multiple threads to join without forceful termination. Allows
threads to synchronize on cleanup.
2016-04-23 03:45:36 -05:00
Christopher Haster 8b8606b98d Add start function for separating object allocation from thread initialization
Allows threads to started separately from when they are declared,
avoiding the need to dynamically allocate threads at runtime.
2016-04-23 03:45:35 -05:00
Martin Kojtal 1ae994fb62 Merge pull request #76 from bridadan/circle-script-adapt-latest-mbed-cli
Updating CircleCI script to latest changes in mbed-cli
2016-05-04 15:55:04 -05:00
Brian Daniels b0aea20317 Adapting test script to mbed-cli commit 4568e889f4 2016-05-04 21:53:24 +01:00
Sam Grove e869cbc954 Merge pull request #66 from 0xc0170/critical_section
Critical section
2016-05-04 15:28:13 -05:00
Sam Grove 4c7142bd84 Merge pull request #73 from bridadan/fix-circle-script
Fixing reference to "neo" in CI script
2016-05-04 08:55:44 -05:00
Bogdan Marinescu 9d33fe89d4 Merge pull request #70 from screamerbg/build-static-libs
Support for compiling static libraries via build.py
2016-05-04 15:39:56 +03:00
Mihail Stoyanov 34ec8297a4 Copy .o and .ar files for when building static library (needed for uVisor for example) 2016-05-04 12:06:57 +01:00
Brian Daniels e88f5ae884 Changing references to 'neo' to 'mbed' inside CircleCI script 2016-05-04 10:10:10 +01:00
Bogdan Marinescu f712259d6b Merge pull request #74 from 0xc0170/fix_utest_slash
utest - fix backslash in the utest paths
2016-05-03 19:31:09 +03:00
Bogdan Marinescu 962ae83b66 Merge pull request #27 from 0xc0170/utest
utest and unity
2016-05-03 13:28:50 +03:00
Mihail Stoyanov ba31ed0550 Support for response files for ARMCC, GCC and IAR archiving (static library)
Support for compiling static libraries via build.py
Support for build.py --no-archive flag which compiles static library as multiple objects
Change default number of jobs when compiling to 0 (auto)
Fix for relative path issue when compiling, which flattened the output whenever absolute path is passed to --build (make.py and build.py)
Fix for temporary files when pre-processing of assembler files with ARMCC
Fix issue with response files where one of the elements is empty string
2016-04-30 00:32:26 +01:00
Anna Bridge 3a59a07dcc Add a c based re-entrant critical section API
This includes a generic critical section implementation, and nrf51
platforms specific implementation.

nrf51- this implementation will use sd_nvic_critical_region_enter if the
softdevice is enabled, otherwise it will use __disable_irq().
This implementation also allow a user to start a critical section while
interrupts are already disabled.
2016-04-29 09:40:52 -05: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 d19f51fbb9 Shim - mbed SDK uses us ticker by default
mbed SDK defines ``__MBED__`` macro (unique, not valid for yotta),
this should turn on us ticker by default, as that one is available
for mbed SDK targets.
2016-04-28 15:21:39 -05:00
Niklas Hauser 53b9fe2820 Include us_ticker.h in scheduler implementation. 2016-04-28 15:21:35 -05:00
Niklas Hauser 62dec8f6e0 Don't enable us_ticker scheduler if minar unavail. 2016-04-28 15:21:31 -05:00
Niklas Hauser 12a46551a5 Use functions instead of macros for porting. 2016-04-28 15:21:27 -05:00
Niklas Hauser 207660cc86 Use shim macros for critical sections in Harness. 2016-04-28 15:21:23 -05:00
Niklas Hauser d5cb178700 Use scheduler provided by shim layer in Harness. 2016-04-28 15:21:19 -05:00
Niklas Hauser 336bffaf05 Add shim definitions for mbed OS definitions.
This allows utest to be used without mbed OS dependencies.
2016-04-28 15:21:16 -05:00
Niklas Hauser 53377a1f4a Adapt Harness to call init and run functions. 2016-04-28 15:21:12 -05:00
Niklas Hauser df1d9f5529 Extend scheduler with init and run callbacks. 2016-04-28 15:21:08 -05:00
Niklas Hauser 6e85376d37 Allow case selection from teardown handler.
This can be used for arbitrary ordering of test cases.
2016-04-28 15:21:04 -05:00
Niklas Hauser 494c303da5 Remove C++11 member initializers. 2016-04-28 15:21:00 -05:00
Niklas Hauser 2fdf733292 Update documentation. 2016-04-28 15:20:56 -05:00
Niklas Hauser d33aabf7ac Handle failure to schedule callback asynchronously. 2016-04-28 15:20:52 -05:00
Niklas Hauser 95462c1d7c Use scheduler interface in harness.
The default implementation uses MINAR as the underlying scheduler,
however, by declaring `config.utest.use_custom_scheduler = true`
MINAR is not included by default.
2016-04-28 15:20:48 -05:00
Niklas Hauser 589dd7b509 Add scheduler interface with documentation. 2016-04-28 15:20:44 -05:00
Niklas Hauser 2e71820fa9 Cleanup confusing default handler namings. 2016-04-28 15:20:40 -05:00
Niklas Hauser 6b692dd5fa Use return value of test setup handler to choose start case. 2016-04-28 15:20:36 -05:00
Niklas Hauser 50917538eb Add `REASON_CASE_INDEX` failure reason. 2016-04-28 15:20:31 -05:00
Niklas Hauser 014b3fef1f Use negative numbers for `status_t`. 2016-04-28 15:20:26 -05:00
Niklas Hauser 2ee605a4ec Update documentation of greentea default handlers. 2016-04-28 15:20:22 -05:00
Niklas Hauser 31a5cf9c34 Also `exit(1)` on test failure. 2016-04-28 15:20:17 -05:00
Niklas Hauser ad8eaadb8f exit(result) after harness finished. 2016-04-28 15:20:13 -05:00
Przemek Wirkus b1af815f49 Add support for greentea-client 2016-04-28 15:20:09 -05:00
Przemek Wirkus 5369d33ae2 Expect FAIL test cases. Merge and squash changes from Niklas
From @niklas-arm:
* Report success to greentea for expected failures.
* Use the greentea setup handlers for correct reporting.
* Remove GREENTEA_START() from all tests.
* Reorder greentea_send_kv to be more readable.
2016-04-28 15:20:05 -05:00
Przemek Wirkus 59fc24ccb2 Refactor failure_handler(s) 2016-04-28 15:20:01 -05:00
Przemek Wirkus 93efc09f4c Replace verbose_case_teardown_handler with greentea counterparts 2016-04-28 15:19:57 -05:00
Przemek Wirkus 982a06cf33 Port tests to Async API feature 2016-04-28 15:19:53 -05:00
Przemek Wirkus 2fc2c1fbcc Modify module configuration 2016-04-28 15:19:49 -05:00
Niklas Hauser 01040bb9bf Do not report failure with uninitialized harness.
Calling `raise_failure` before harness is initialized can print
unintentional failure strings.
This disallows using Unity macros outside of the utest harness.
2016-04-28 15:19:44 -05:00
Martin Kojtal 4db0ec48c3 Case - add control handler check to is_empty() 2016-04-28 15:19:41 -05:00
Niklas Hauser 110b13e8b5 Properly deprecate `FAILURE_` enumerations. 2016-04-28 15:19:37 -05:00
Niklas Hauser 3aaa6c903b Update documentation and changelog. 2016-04-28 15:19:33 -05:00
Niklas Hauser e68d00ded5 Add location to failure information.
Rename `failure_t` to `failure_reason_t`.
Add `location_t` with stringify function.
Add new `failure_t` struct with location information.
Adapt harness logic to keep track of location.
Add a test failure handler that reports assertion failures
on test setup and test teardown.
2016-04-28 15:19:29 -05:00
Niklas Hauser 5a052a523a Fixed premature validation attribute modification. 2016-04-28 15:19:25 -05:00
Niklas Hauser 7f9f0d81ab Allow case attribute modification in callback validation. 2016-04-28 15:19:21 -05:00