require a key press before entering the dev console

this improves our ability to detect terminals that support line editing
This commit is contained in:
jacqueline
2024-06-27 16:12:43 +10:00
parent 1036f1b00e
commit 688fe79471
4 changed files with 33 additions and 3 deletions
+11
View File
@@ -5,9 +5,13 @@
*/
#include <stdio.h>
#include <sys/fcntl.h>
#include <sys/unistd.h>
#include <cstdint>
#include "freertos/FreeRTOS.h"
#include "catch_runner.hpp"
#include "esp_console.h"
#include "esp_log.h"
@@ -27,6 +31,13 @@ void RegisterCatch2() {
namespace console {
class TestConsole : public Console {
public:
virtual auto PrerunCallback() -> void {
char* arg = "catch";
exec_catch2(1, &arg);
Console::PrerunCallback();
}
protected:
virtual auto RegisterExtraComponents() -> void { RegisterCatch2(); }
virtual auto GetStackSizeKiB() -> uint16_t {