Skip to content

Test #2450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed

Test #2450

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,10 @@ Develop
> ... do things ...
> "venv/Scripts/deactivate"
```







4 changes: 3 additions & 1 deletion TESTS/integration/basic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

int main() {
GREENTEA_SETUP(15, "default_auto");
GREENTEA_TESTCASE_START("Integration: Basic");
GREENTEA_TESTCASE_FINISHED("Basic", 1, 0);
GREENTEA_TESTSUITE_RESULT(true);
}
}
8 changes: 8 additions & 0 deletions TESTS/integration/basic/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"Integration: Basic": {
"unique_name": "Integration: Basic",
"summary": "Integration: Basic"
}
}
}
8 changes: 5 additions & 3 deletions TESTS/integration/threaded_blinky/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ void led1_thread(void const *args) {

int main() {
GREENTEA_SETUP(20, "wait_us_auto");
GREENTEA_TESTCASE_START("Threaded blinky");

Thread thread(led1_thread);

while (true) {
}
}
Thread::wait(1000 * 10);
GREENTEA_TESTCASE_FINISHED("Threaded blinky", 1, 0);
GREENTEA_TESTSUITE_RESULT(1);
}
8 changes: 8 additions & 0 deletions TESTS/integration/threaded_blinky/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"Threaded blinky": {
"unique_name": "Threaded blinky",
"summary": "Threaded blinky"
}
}
}
36 changes: 36 additions & 0 deletions TESTS/mbed_drivers/c_strings/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"tests": {
"C strings: strpbrk": {
"unique_name": "C strings: strpbrk",
"summary": "C strings: strpbrk"
},
"C strings: %g %g float formatting": {
"unique_name": "C strings: %g %g float formatting",
"summary": "C strings: %g %g float formatting"
},
"C strings: %f %f float formatting": {
"unique_name": "C strings: %f %f float formatting",
"summary": "C strings: %f %f float formatting"
},
"C strings: %u %d integer formatting": {
"unique_name": "C strings: %u %d integer formatting",
"summary": "C strings: %u %d integer formatting"
},
"C strings: strtok": {
"unique_name": "C strings: strtok",
"summary": "C strings: strtok"
},
"C strings: %i %d integer formatting": {
"unique_name": "C strings: %i %d integer formatting",
"summary": "C strings: %i %d integer formatting"
},
"C strings: %e %E float formatting": {
"unique_name": "C strings: %e %E float formatting",
"summary": "C strings: %e %E float formatting"
},
"C strings: %x %E integer formatting": {
"unique_name": "C strings: %x %E integer formatting",
"summary": "C strings: %x %E integer formatting"
}
}
}
84 changes: 84 additions & 0 deletions TESTS/mbed_drivers/callback/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"tests": {
"Testing FunctionPointerArg1 compatibility": {
"unique_name": "Testing FunctionPointerArg1 compatibility",
"summary": "Testing FunctionPointerArg1 compatibility"
},
"Testing callbacks with 5 ints": {
"unique_name": "Testing callbacks with 5 ints",
"summary": "Testing callbacks with 5 ints"
},
"Testing callbacks with 0 uchars": {
"unique_name": "Testing callbacks with 0 uchars",
"summary": "Testing callbacks with 0 uchars"
},
"Testing callbacks with 1 ints": {
"unique_name": "Testing callbacks with 1 ints",
"summary": "Testing callbacks with 1 ints"
},
"Testing callbacks with 5 uint64s": {
"unique_name": "Testing callbacks with 5 uint64s",
"summary": "Testing callbacks with 5 uint64s"
},
"Testing FunctionPointer compatibility": {
"unique_name": "Testing FunctionPointer compatibility",
"summary": "Testing FunctionPointer compatibility"
},
"Testing callbacks with 2 uchars": {
"unique_name": "Testing callbacks with 2 uchars",
"summary": "Testing callbacks with 2 uchars"
},
"Testing callbacks with 3 ints": {
"unique_name": "Testing callbacks with 3 ints",
"summary": "Testing callbacks with 3 ints"
},
"Testing callbacks with 2 uint64s": {
"unique_name": "Testing callbacks with 2 uint64s",
"summary": "Testing callbacks with 2 uint64s"
},
"Testing callbacks with 1 uchars": {
"unique_name": "Testing callbacks with 1 uchars",
"summary": "Testing callbacks with 1 uchars"
},
"Testing callbacks with 0 ints": {
"unique_name": "Testing callbacks with 0 ints",
"summary": "Testing callbacks with 0 ints"
},
"Testing callbacks with 1 uint64s": {
"unique_name": "Testing callbacks with 1 uint64s",
"summary": "Testing callbacks with 1 uint64s"
},
"Testing callbacks with 3 uchars": {
"unique_name": "Testing callbacks with 3 uchars",
"summary": "Testing callbacks with 3 uchars"
},
"Testing callbacks with 4 uint64s": {
"unique_name": "Testing callbacks with 4 uint64s",
"summary": "Testing callbacks with 4 uint64s"
},
"Testing callbacks with 2 ints": {
"unique_name": "Testing callbacks with 2 ints",
"summary": "Testing callbacks with 2 ints"
},
"Testing callbacks with 3 uint64s": {
"unique_name": "Testing callbacks with 3 uint64s",
"summary": "Testing callbacks with 3 uint64s"
},
"Testing callbacks with 4 uchars": {
"unique_name": "Testing callbacks with 4 uchars",
"summary": "Testing callbacks with 4 uchars"
},
"Testing callbacks with 5 uchars": {
"unique_name": "Testing callbacks with 5 uchars",
"summary": "Testing callbacks with 5 uchars"
},
"Testing callbacks with 0 uint64s": {
"unique_name": "Testing callbacks with 0 uint64s",
"summary": "Testing callbacks with 0 uint64s"
},
"Testing callbacks with 4 ints": {
"unique_name": "Testing callbacks with 4 ints",
"summary": "Testing callbacks with 4 ints"
}
}
}
9 changes: 5 additions & 4 deletions TESTS/mbed_drivers/dev_null/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include "mbed.h"
#include "greentea-client/test_env.h"

#define TEST_NAME "/dev/null test"

class DevNull : public Stream {
public:
DevNull(const char *name = NULL) : Stream(name) {}
Expand All @@ -34,6 +36,7 @@ DevNull null("null");

int main() {
GREENTEA_SETUP(2, "dev_null_auto");
GREENTEA_TESTCASE_START("/dev/null test");

printf("MBED: before re-routing stdout to /null\n"); // This shouldn't appear
greentea_send_kv("to_stdout", "re-routing stdout to /null");
Expand All @@ -44,8 +47,6 @@ int main() {
printf("{{to_null;printf redirected to /null}}\n");
printf("MBED: this printf is already redirected to /null\n");
}

while(1) {
// Success is determined by the host test at this point, so busy wait
}
GREENTEA_TESTCASE_FINISHED(TEST_NAME, 1, 0);
GREENTEA_TESTSUITE_RESULT(1);
}
8 changes: 8 additions & 0 deletions TESTS/mbed_drivers/dev_null/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"/dev/null test": {
"unique_name": "/dev/null test",
"summary": "/dev/null test"
}
}
}
16 changes: 16 additions & 0 deletions TESTS/mbed_drivers/echo/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"tests": {
"Echo server: x16": {
"unique_name": "Echo server: x16",
"summary": "Echo server: x16"
},
"Echo server: x64": {
"unique_name": "Echo server: x64",
"summary": "Echo server: x64"
},
"Echo server: x32": {
"unique_name": "Echo server: x32",
"summary": "Echo server: x32"
}
}
}
2 changes: 1 addition & 1 deletion TESTS/mbed_drivers/generic_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ utest::v1::status_t greentea_failure_handler(const Case *const source, const fai

// Generic test cases
Case cases[] = {
Case("Basic", test_case_basic, greentea_failure_handler),
Case("mbed_drivers: Basic", test_case_basic, greentea_failure_handler),
Case("Blinky", test_case_blinky, greentea_failure_handler),
Case("C++ stack", test_case_cpp_stack, greentea_failure_handler),
Case("C++ heap", test_case_cpp_heap, greentea_failure_handler)
Expand Down
20 changes: 20 additions & 0 deletions TESTS/mbed_drivers/generic_tests/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"tests": {
"Blinky": {
"unique_name": "Blinky",
"summary": "Blinky"
},
"C++ stack": {
"unique_name": "C++ stack",
"summary": "C++ stack"
},
"mbed_drivers: Basic": {
"unique_name": "mbed_drivers: Basic",
"summary": "mbed_drivers: Basic"
},
"C++ heap": {
"unique_name": "C++ heap",
"summary": "C++ heap"
}
}
}
8 changes: 8 additions & 0 deletions TESTS/mbed_drivers/rtc/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"RTC strftime": {
"unique_name": "RTC strftime",
"summary": "RTC strftime"
}
}
}
20 changes: 20 additions & 0 deletions TESTS/mbed_drivers/stl_features/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"tests": {
"STL std::sort abs": {
"unique_name": "STL std::sort abs",
"summary": "STL std::sort abs"
},
"STL std::equal": {
"unique_name": "STL std::equal",
"summary": "STL std::equal"
},
"STL std::transform": {
"unique_name": "STL std::transform",
"summary": "STL std::transform"
},
"STL std::sort greater": {
"unique_name": "STL std::sort greater",
"summary": "STL std::sort greater"
}
}
}
16 changes: 16 additions & 0 deletions TESTS/mbed_drivers/ticker/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"tests": {
"Timers: 1x ticker": {
"unique_name": "Timers: 1x ticker",
"summary": "Timers: 1x ticker"
},
"Timers: 2x tickers": {
"unique_name": "Timers: 2x tickers",
"summary": "Timers: 2x tickers"
},
"Timers: 2x callbacks": {
"unique_name": "Timers: 2x callbacks",
"summary": "Timers: 2x callbacks"
}
}
}
8 changes: 8 additions & 0 deletions TESTS/mbed_drivers/timeout/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"Timers: toggle on/off": {
"unique_name": "Timers: toggle on/off",
"summary": "Timers: toggle on/off"
}
}
}
8 changes: 8 additions & 0 deletions TESTS/mbed_drivers/wait_us/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"Timers: wait_us": {
"unique_name": "Timers: wait_us",
"summary": "Timers: wait_us"
}
}
}
40 changes: 40 additions & 0 deletions TESTS/mbedmicro-mbed/attributes/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"tests": {
"Testing NORETURN attribute": {
"unique_name": "Testing NORETURN attribute",
"summary": "Testing NORETURN attribute"
},
"Testing UNUSED attribute": {
"unique_name": "Testing UNUSED attribute",
"summary": "Testing UNUSED attribute"
},
"Testing PACKED attribute": {
"unique_name": "Testing PACKED attribute",
"summary": "Testing PACKED attribute"
},
"Testing UNREACHABLE attribute": {
"unique_name": "Testing UNREACHABLE attribute",
"summary": "Testing UNREACHABLE attribute"
},
"Testing WEAK attribute": {
"unique_name": "Testing WEAK attribute",
"summary": "Testing WEAK attribute"
},
"Testing PURE attribute": {
"unique_name": "Testing PURE attribute",
"summary": "Testing PURE attribute"
},
"Testing FORCEINLINE attribute": {
"unique_name": "Testing FORCEINLINE attribute",
"summary": "Testing FORCEINLINE attribute"
},
"Testing DEPRECATED attribute": {
"unique_name": "Testing DEPRECATED attribute",
"summary": "Testing DEPRECATED attribute"
},
"Testing ALIGN attribute": {
"unique_name": "Testing ALIGN attribute",
"summary": "Testing ALIGN attribute"
}
}
}
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-mbed/call_before_main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ extern "C" void mbed_main() {

int main() {
GREENTEA_SETUP(5, "default_auto");
GREENTEA_TESTCASE_START("Call before main");
printf("MBED: main() starts now!\r\n");
GREENTEA_TESTCASE_FINISHED("Call before main", 1, 0);
GREENTEA_TESTSUITE_RESULT(mbed_main_called);
}
8 changes: 8 additions & 0 deletions TESTS/mbedmicro-mbed/call_before_main/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tests": {
"Call before main": {
"unique_name": "Call before main",
"summary": "Call before main"
}
}
}
Loading