mirror of https://github.com/ARMmbed/mbed-os.git
Autodetection: Added support for Unit Tests (CppUTest test runner)
parent
035714e409
commit
2a07aea5ab
|
@ -10,8 +10,12 @@ It is declared in \cpputest\src\Platforms\armcc\UtestPlatform.cpp
|
||||||
*/
|
*/
|
||||||
Serial mbed_cpputest_console(STDIO_UART_TX, STDIO_UART_RX);
|
Serial mbed_cpputest_console(STDIO_UART_TX, STDIO_UART_RX);
|
||||||
|
|
||||||
int main(int ac, char** av)
|
int main(int ac, char** av) {
|
||||||
{
|
TEST_TIMEOUT(20);
|
||||||
|
TEST_HOSTTEST(default_auto);
|
||||||
|
TEST_DESCRIPTION(Unit test);
|
||||||
|
TEST_START("UT");
|
||||||
|
|
||||||
unsigned failureCount = 0;
|
unsigned failureCount = 0;
|
||||||
{
|
{
|
||||||
// Some compilers may not pass ac, av so we need to supply them ourselves
|
// Some compilers may not pass ac, av so we need to supply them ourselves
|
||||||
|
@ -20,6 +24,6 @@ int main(int ac, char** av)
|
||||||
failureCount = CommandLineTestRunner::RunAllTests(ac, av);
|
failureCount = CommandLineTestRunner::RunAllTests(ac, av);
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_completion(failureCount == 0);
|
TEST_RESULT(failureCount == 0);
|
||||||
return failureCount;
|
return failureCount;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue