Add minunit test framework (#168)
* add minunit tests * fix logging * ignore unexisting time service on embedded targets * fix warning, issue with printf * add exitcode * migrate to printf * indicate test by leds * add testing description * redesigned minunit tests to allow testing in separate files * add test step for local target * add failure test * add restore test_check * testing description Co-authored-by: rusdacent <rusdacentx0x08@gmail.com> Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
21
core/app.cpp
21
core/app.cpp
@@ -1,14 +1,20 @@
|
||||
#include "flipper.h"
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" {
|
||||
#include "furi.h"
|
||||
#include "log.h"
|
||||
#include "startup.h"
|
||||
#include "tty_uart.h"
|
||||
#include "flipper.h"
|
||||
#include "furi.h"
|
||||
#include "log.h"
|
||||
#include "startup.h"
|
||||
#include "tty_uart.h"
|
||||
}
|
||||
|
||||
extern "C" void app() {
|
||||
// for testing purpose
|
||||
uint32_t exitcode = 0;
|
||||
extern "C" void set_exitcode(uint32_t _exitcode) {
|
||||
exitcode = _exitcode;
|
||||
}
|
||||
|
||||
extern "C" int app() {
|
||||
register_tty_uart();
|
||||
|
||||
FuriRecordSubscriber* log = get_default_log();
|
||||
@@ -33,8 +39,9 @@ extern "C" void app() {
|
||||
}
|
||||
}
|
||||
delay(500);
|
||||
// TODO add deferred event queue here
|
||||
} while(is_alive);
|
||||
|
||||
fuprintf(log, "\n=== Bye from Flipper Zero! ===\n\n");
|
||||
|
||||
return (int)exitcode;
|
||||
}
|
@@ -29,3 +29,5 @@ extern "C" {
|
||||
#define INPUT GpioModeInput
|
||||
#define LOW false
|
||||
#define HIGH true
|
||||
|
||||
void set_exitcode(uint32_t _exitcode);
|
||||
|
Reference in New Issue
Block a user