summaryrefslogtreecommitdiff
path: root/test/buildtool/graph_traverser
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/graph_traverser')
-rw-r--r--test/buildtool/graph_traverser/TARGETS3
-rw-r--r--test/buildtool/graph_traverser/graph_traverser.test.hpp4
-rw-r--r--test/buildtool/graph_traverser/graph_traverser_remote.test.cpp6
3 files changed, 7 insertions, 6 deletions
diff --git a/test/buildtool/graph_traverser/TARGETS b/test/buildtool/graph_traverser/TARGETS
index d9dd7af6..b2791561 100644
--- a/test/buildtool/graph_traverser/TARGETS
+++ b/test/buildtool/graph_traverser/TARGETS
@@ -23,6 +23,7 @@
, ["@", "src", "src/buildtool/execution_api/common", "api_bundle"]
, ["@", "src", "src/buildtool/storage", "storage"]
, ["@", "src", "src/buildtool/storage", "config"]
+ , ["utils", "test_hash_function_type"]
]
, "stage": ["test", "buildtool", "graph_traverser"]
}
@@ -55,10 +56,10 @@
, ["utils", "catch-main-remote-execution"]
, ["utils", "test_auth_config"]
, ["utils", "test_remote_config"]
+ , ["utils", "test_hash_function_type"]
, ["@", "src", "src/buildtool/storage", "storage"]
, ["@", "src", "src/buildtool/storage", "config"]
, ["@", "src", "src/buildtool/crypto", "hash_function"]
- , ["@", "src", "src/buildtool/common", "protocol_traits"]
]
, "stage": ["test", "buildtool", "graph_traverser"]
}
diff --git a/test/buildtool/graph_traverser/graph_traverser.test.hpp b/test/buildtool/graph_traverser/graph_traverser.test.hpp
index 666b905f..cb9cb57c 100644
--- a/test/buildtool/graph_traverser/graph_traverser.test.hpp
+++ b/test/buildtool/graph_traverser/graph_traverser.test.hpp
@@ -47,6 +47,7 @@
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/storage.hpp"
#include "src/utils/cpp/json.hpp"
+#include "test/utils/hermeticity/test_hash_function_type.hpp"
// NOLINTNEXTLINE(google-build-namespaces)
namespace {
@@ -128,7 +129,8 @@ class TestProject {
CommandLineArguments clargs{gtargs};
clargs.artifacts = entry_points;
auto const comp_graph = root_dir_ / "graph_description_compatible";
- if (ProtocolTraits::Instance().IsCompatible() and
+ if (not ProtocolTraits::IsNative(
+ TestHashType::ReadFromEnvironment()) and
FileSystemManager::Exists(comp_graph)) {
clargs.graph_description = comp_graph;
}
diff --git a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp
index bf3dfe02..a7888ac4 100644
--- a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp
+++ b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp
@@ -13,12 +13,12 @@
// limitations under the License.
#include "catch2/catch_test_macros.hpp"
-#include "src/buildtool/common/protocol_traits.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/storage.hpp"
#include "test/buildtool/graph_traverser/graph_traverser.test.hpp"
+#include "test/utils/hermeticity/test_hash_function_type.hpp"
#include "test/utils/remote_execution/test_auth_config.hpp"
#include "test/utils/remote_execution/test_remote_config.hpp"
@@ -35,9 +35,7 @@
StorageConfig::Builder builder;
auto config = builder.SetBuildRoot(cache_dir)
- .SetHashType(ProtocolTraits::Instance().IsCompatible()
- ? HashFunction::Type::PlainSHA256
- : HashFunction::Type::GitSHA1)
+ .SetHashType(TestHashType::ReadFromEnvironment())
.SetRemoteExecutionArgs(remote_config.remote_address,
remote_config.platform_properties,
remote_config.dispatch)