Files
PS5_RetroArch/tests/webui_update_main.cpp
Mihawk 09ea2c2a66 Add verified console updates and BIOS alerts to the WebUI
Download and verify published packages on-console, stage changed managed files, preserve user data, and install after frontend shutdown. Set eboot execute permission explicitly so native installations relaunch.

Validation: tools/verify.sh (118 tests, native build and all gates); browser state checks; actual Alpha 6 download/install/relaunch and unchanged config. Evidence: evidence/webui-update/.
2026-10-02 19:06:46 -04:00

33 lines
972 B
C++

/* Exercise the shipped extraction/installation transaction with generated fixtures. */
#include "../src/webui_update.h"
#include <cstdio>
#include <string>
#include <unistd.h>
int main(int argc, char **argv)
{
if (argc < 3)
return 2;
std::string root = argv[1], action = argv[2];
ps5_update::initialize(root);
bool ok = true;
if (action != "recover")
{
if (argc != 5)
return 2;
ok = ps5_update::prepare(root, argv[3], argv[4]);
if (ok && action != "prepare")
{
ok = ps5_update::request_install();
if (action == "fail")
unlink((root + "/.update/stage/webui/app.js").c_str());
ps5_update::stop();
ok = ps5_update::install() && ok;
}
}
else
ok = ps5_update::status().state != "error";
auto s = ps5_update::status();
std::printf("%s: %s\n", s.state.c_str(), s.message.c_str());
return ok ? 0 : 1;
}