Standalone: activate component generations

This commit is contained in:
faumaray committed 2026-07-29 01:28:50 +03:00
1 parent 3320a0fd74
commit fca42a29ce
3 files changed
+1447 -15

No files matched your search

+8 -3
View File
@@ -86,8 +86,12 @@ foreach(_update_default IN ITEMS
message(FATAL_ERROR "${_update_default} contains the generated-header delimiter")
endif()
endforeach()
set(ECHOION_TOOLCHAIN_ABI
"${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set(ECHOION_TOOLCHAIN_ABI "" CACHE STRING
"Exact ABI/toolchain contract required by modular component feeds")
if(ECHOION_TOOLCHAIN_ABI STREQUAL "")
set(ECHOION_TOOLCHAIN_ABI
"${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/include/echoion/standalone/UpdateBuildDefaults.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/generated/echoion/standalone/UpdateBuildDefaults.hpp"
@@ -206,6 +210,7 @@ if(BUILD_TESTS)
add_executable(echoion_update_service_tests
tests/test_update_service.cpp
src/ReleaseManifest.cpp
src/UpdateService.cpp
)
target_include_directories(echoion_update_service_tests PRIVATE
@@ -215,7 +220,7 @@ if(BUILD_TESTS)
target_link_libraries(echoion_update_service_tests PRIVATE
Echoion::ApiBase Echoion::ApiConfig
Void::Archive Void::Crypto Void::Data Void::Log Void::Net Void::Plugin
Void::System Void::Update Threads::Threads)
Void::System Void::Update OpenSSL::Crypto Threads::Threads)
add_test(NAME echoion_update_service_tests
COMMAND echoion_update_service_tests)
+1424 -10
View File
File diff suppressed because it is too large. Load diff
+15 -2
View File
@@ -257,8 +257,7 @@ int main()
Echoion::Standalone::UpdateService::Hooks{});
std::weak_ptr<Echoion::Standalone::UpdateService> observedService =
ownedService;
auto handler =
Echoion::Standalone::bindUpdateService(ownedService);
auto handler = Echoion::Standalone::bindUpdateService(ownedService);
ownedService.reset();
check(!observedService.expired(),
"host control handler did not retain UpdateService");
@@ -433,6 +432,20 @@ int main()
};
auto service = makeService();
check(service.start().has_value(), "UpdateService did not start");
check(service.handle("updates.history", "{}").has_value(),
"dynamic update history RPC was unavailable");
check(!service.handle("updates.preview", "{}").has_value(),
"transaction preview succeeded without a checked catalog");
check(!service
.handle("updates.applyTransaction",
R"({"transactionId":"missing"})")
.has_value(),
"component transaction apply succeeded without a checked catalog");
check(!service
.handle("updates.rollbackGeneration",
R"({"generationId":"missing"})")
.has_value(),
"generation rollback accepted an unadvertised target");
check(!std::filesystem::exists(
pluginStore.versionPath(*Void::Semver::parse("1.0.0"))),
"managed plugin startup retention did not prune the oldest version");