Implement HTTPS lifecycle and reboot controls
This commit is contained in:
@@ -61,6 +61,7 @@ serial_settings = "--serial-settings" in sys.argv
|
||||
accounts = "--accounts" in sys.argv
|
||||
broker = "--broker" in sys.argv
|
||||
ssh_settings = "--ssh" in sys.argv
|
||||
lifecycle = "--lifecycle" in sys.argv
|
||||
display = "--display" in sys.argv
|
||||
if display:
|
||||
HEADERS["nvs_flash.h"] = '#pragma once\n#include "esp_err.h"\nesp_err_t nvs_flash_init(void);\n'
|
||||
@@ -251,6 +252,14 @@ with tempfile.TemporaryDirectory(prefix="web-cookie-auth-") as directory:
|
||||
*(["-DHOST_DISPLAY"] if display else []),
|
||||
*(["-DHOST_BROKER"] if broker else []),
|
||||
*(["-DHOST_SSH_SETTINGS"] if ssh_settings else []),
|
||||
*(["-DHOST_LIFECYCLE"] if lifecycle else []),
|
||||
"-I" + str(tmp), "-I" + str(ROOT / "src"), *map(str, sources), "-lcrypto",
|
||||
"-o", str(tmp / "test")], check=True, timeout=30)
|
||||
subprocess.run([str(tmp / "test")], check=True, timeout=20)
|
||||
if lifecycle:
|
||||
guard = subprocess.run(["cc", "-E", "-DCONFIG_HTTPD_QUEUE_WORK_BLOCKING=1",
|
||||
"-I" + str(tmp), "-I" + str(ROOT / "src"),
|
||||
str(ROOT / "src/web_lifecycle_settings.c")], stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.PIPE, timeout=30)
|
||||
assert guard.returncode and b"Lifecycle ACK handoff requires nonblocking" in guard.stderr
|
||||
print("PASS lifecycle compile-time rejection of blocking HTTPD work submission")
|
||||
|
||||
Reference in New Issue
Block a user