Keep Mini single-use helpers out of line and align native fixtures

This commit is contained in:
mikecarper committed 2026-10-28 03:26:36 -07:00
1 parent f0bcb10ff0
commit 8fdad47b27
8 files changed
+15 -3

No files matched your search

+1
View File
@@ -12,4 +12,5 @@ if env["PIOENV"] == "wio-e5-mini_repeater":
"-fno-reorder-blocks",
"-fno-reorder-functions",
"-fno-tree-switch-conversion",
"-fno-inline-functions-called-once",
])
+1 -1
View File
@@ -11,7 +11,7 @@ struct NodePrefs : ConfigSerializer {
uint16_t bridge_delay = 500;
uint8_t bridge_pkt_src = 1, bridge_channel = 1, bridge_format = 0;
uint32_t bridge_baud = 115200;
uint8_t usb_logging_enabled = 0, usb_debug_enabled = 0;
uint8_t usb_logging_enabled = 0, usb_debug_enabled = 0, usb_logging_always = 0;
uint8_t rs232_autosleep = 1;
uint8_t rs232_heartbeat = 1;
uint16_t rs232_idle_seconds = 300;
+2
View File
@@ -20,6 +20,7 @@ HARNESS = r'''
#include <vector>
#include <Identity.h>
#include <helpers/CompanionPowerDiagnostics.h>
#include "usb_mode_console.h"
// Keep the production diagnostics delegate in the command path. Identity
// requests must not consult board power state or trigger a hardware query.
@@ -190,6 +191,7 @@ class CompanionIdentityCliTests(unittest.TestCase):
'-fsanitize=address,undefined', '-fno-sanitize-recover=all',
'-fno-pie', '-no-pie', *['-D' + flag for flag in flags],
'-I', str(ROOT / 'src'), '-I', str(ROOT / 'test/mocks'),
'-I', str(ROOT / 'test/fixtures'),
str(cpp), '-o', str(binary)], capture_output=True, text=True)
self.assertEqual(built.returncode, 0, built.stdout + built.stderr)
ran = subprocess.run([str(binary)], capture_output=True, text=True)
+3 -1
View File
@@ -17,7 +17,9 @@ class CompanionWiFiStatusTest(unittest.TestCase):
self.assertIn('strcmp(command, "get wifi.status") == 0', main)
self.assertNotIn('"get wifi.status detail"', main)
self.assertNotIn('"get wifi.compat"', main)
self.assertIn('get wifi.status (connection, saved/boot/live settings)', mesh)
self.assertIn('#include "CompanionHelp.inc"', mesh)
self.assertIn('get wifi.status (connection, saved/boot/live settings)',
(ROOT / "examples/companion_radio/CompanionHelp.inc").read_text())
self.assertIn('formatCompanionWiFiStatusSnapshot(reply, reply_size, snapshot);', main)
local = mesh[mesh.index("bool MyMesh::handleLocalControlCommand("):]
self.assertLess(local.index("handleCompanionWiFiCompatibilityCommand("),
@@ -26,6 +26,9 @@ class ManagementPasswordCommandsTest(unittest.TestCase):
#include <cstdio>
#include <cstring>
#include <initializer_list>
struct HardwareSerial {};
static HardwareSerial Serial;
#include <helpers/UsbMode.h>
using namespace mesh::esp32::managementPassword;
bool save_ok = true; int saves = 0;
bool durableSave() {
+1
View File
@@ -22,6 +22,7 @@ LINK_SIZE_FLAGS = (
"-fno-reorder-blocks",
"-fno-reorder-functions",
"-fno-tree-switch-conversion",
"-fno-inline-functions-called-once",
)
OPTIONAL_CUTS = (
"MESH_ENABLE_CARRIER_TOOLS",
+3 -1
View File
@@ -147,7 +147,9 @@ int main() {
help_body = companion[help_start:help_end]
self.assertRegex(help_body, r"auto& \w+ = terminalOutput\(\);")
# This line may share a bounded help chunk with adjacent commands.
self.assertIn('" get storage.layout\\r\\n"', help_body)
self.assertIn('#include "CompanionHelp.inc"', help_body)
self.assertIn('" get storage.layout\\r\\n"',
(ROOT / "examples/companion_radio/CompanionHelp.inc").read_text())
# ESP-IDF discovery and every platform-specific result live only in the
# shared formatter; neither role owns a second copy.
+1
View File
@@ -44,6 +44,7 @@ build_flags = ${lora_e5_mini.build_flags}
-fno-reorder-functions
-fno-tree-switch-conversion
-fno-inline-small-functions ; reduce flash without moving the deployed filesystem boundary
-fno-inline-functions-called-once
-fipa-pta
-fmerge-all-constants
-fno-ipa-cp-clone