diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-06-13 13:30:13 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-06-13 15:55:41 +0200 |
commit | e4bbf59415e610fc090572aff29cd20cdb9c41f8 (patch) | |
tree | 41f8f3e3fae12c6ea21e4ac18d124dad08e6748c /test/utils/remote_execution/main-remote-execution.cpp | |
parent | 47bb77c39199ae4842f79347de076a4534f7d310 (diff) | |
download | justbuild-e4bbf59415e610fc090572aff29cd20cdb9c41f8.tar.gz |
RemoteExecutionConfig: Keep global platform properties
... and cache endpoint address for rebuilding.
Diffstat (limited to 'test/utils/remote_execution/main-remote-execution.cpp')
-rw-r--r-- | test/utils/remote_execution/main-remote-execution.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/utils/remote_execution/main-remote-execution.cpp b/test/utils/remote_execution/main-remote-execution.cpp index 4db1d690..e930d893 100644 --- a/test/utils/remote_execution/main-remote-execution.cpp +++ b/test/utils/remote_execution/main-remote-execution.cpp @@ -27,12 +27,18 @@ void wait_for_grpc_to_shutdown() { HashGenerator::SetHashGenerator(HashGenerator::HashType::SHA256); } auto address = ReadRemoteAddressFromEnv(); - auto& config = RemoteExecutionConfig::Instance(); - if (address and not config.SetAddress(*address)) { + if (address and not RemoteExecutionConfig::SetRemoteAddress(*address)) { Logger::Log(LogLevel::Error, "parsing address '{}' failed.", *address); std::exit(EXIT_FAILURE); } - return config.IsValidAddress(); + for (auto const& property : ReadPlatformPropertiesFromEnv()) { + if (not RemoteExecutionConfig::AddPlatformProperty(property)) { + Logger::Log( + LogLevel::Error, "parsing property '{}' failed.", property); + std::exit(EXIT_FAILURE); + } + } + return static_cast<bool>(RemoteExecutionConfig::RemoteAddress()); } } // namespace |