From 9d9d88b171a96d4d5201075c24b830ad82cd374d Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 25 Dec 2022 13:02:54 +0100 Subject: [PATCH] compile with limited set of tests (flash mem overload) --- src/test/test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/test/test.cpp b/src/test/test.cpp index d4ab3fe8e..1e6452263 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -29,6 +29,7 @@ bool Test::run_test(const char * command, int8_t id) { return false; } + if (strcmp(command, "general") == 0) { EMSESP::logger().info("Testing general. Adding a Boiler and Thermostat"); @@ -53,6 +54,8 @@ bool Test::run_test(const char * command, int8_t id) { return true; } +#ifndef EMSESP_DEBUG_LIMITED + if (strcmp(command, "2thermostats") == 0) { EMSESP::logger().info("Testing with multiple thermostats..."); @@ -216,6 +219,8 @@ bool Test::run_test(const char * command, int8_t id) { return true; } +#endif + return false; } @@ -231,6 +236,9 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const EMSESP::watch(EMSESP::Watch::WATCH_RAW); // raw std::string command(20, '\0'); + +#ifndef EMSESP_DEBUG_LIMITED + if ((cmd.empty()) || (cmd == "default")) { command = EMSESP_DEBUG_DEFAULT; } else { @@ -1548,6 +1556,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const #pragma GCC diagnostic pop } + +#endif + + if (command == "limited") { + shell.printfln("Run a limited memory test..."); + + run_test("general"); + } } // simulates a telegram in the Rx queue, but without the CRC which is added automatically