diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2022-05-09 10:59:45 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2022-05-09 10:59:45 +0200 |
commit | e3028f4c2fbf34e1fd2ecc675b7533f03043fa3b (patch) | |
tree | c1470faf1cfc5375a6989c21e7f7ffd0368368f8 /test/utils/remote_execution/main-remote-execution.cpp | |
parent | bd769ae7d72860d201a201cc6e3f68ffa66f4add (diff) | |
download | justbuild-e3028f4c2fbf34e1fd2ecc675b7533f03043fa3b.tar.gz |
allow for run tests in compatibility mode
Diffstat (limited to 'test/utils/remote_execution/main-remote-execution.cpp')
-rw-r--r--[-rwxr-xr-x] | test/utils/remote_execution/main-remote-execution.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/utils/remote_execution/main-remote-execution.cpp b/test/utils/remote_execution/main-remote-execution.cpp index 3f435dcc..4db1d690 100755..100644 --- a/test/utils/remote_execution/main-remote-execution.cpp +++ b/test/utils/remote_execution/main-remote-execution.cpp @@ -6,6 +6,7 @@ #include <thread> #include "catch2/catch.hpp" +#include "src/buildtool/compatibility/compatibility.hpp" #include "src/buildtool/execution_api/remote/config.hpp" #include "test/utils/logging/log_config.hpp" #include "test/utils/test_env.hpp" @@ -21,6 +22,10 @@ void wait_for_grpc_to_shutdown() { /// environment variable is malformed, we write a message and stop execution. /// \returns true If remote execution was successfully configured. [[nodiscard]] auto ConfigureRemoteExecution() -> bool { + ReadCompatibilityFromEnv(); + if (Compatibility::IsCompatible()) { + HashGenerator::SetHashGenerator(HashGenerator::HashType::SHA256); + } auto address = ReadRemoteAddressFromEnv(); auto& config = RemoteExecutionConfig::Instance(); if (address and not config.SetAddress(*address)) { |