compile with limited set of tests (flash mem overload)

This commit is contained in:
Proddy
2022-12-25 13:02:54 +01:00
parent 291da3f7fe
commit 9d9d88b171

View File

@@ -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