From d53358c350898091d9cf2ba76ccdfa9e590275ee Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 26 Feb 2025 10:16:30 +0100 Subject: Make graph-dumping options cummulative If --dump-graph or --dump-plain-graph is given several times, the action graph wil also be written several times. In this way, regular use of those options will not be affected by adding them implicitly through invocation-logging options in the rc file. --- test/buildtool/build_engine/target_map/result_map.test.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/buildtool') diff --git a/test/buildtool/build_engine/target_map/result_map.test.cpp b/test/buildtool/build_engine/target_map/result_map.test.cpp index e326c725..7e4228f5 100644 --- a/test/buildtool/build_engine/target_map/result_map.test.cpp +++ b/test/buildtool/build_engine/target_map/result_map.test.cpp @@ -81,7 +81,7 @@ TEST_CASE("empty map", "[result_map]") { R"({"actions": {}, "blobs": [], "trees": {}})"_json); auto filename = (GetTestDir() / "test_empty.graph").string(); - map.ToFile(filename, &stats, &progress); + map.ToFile({std::filesystem::path(filename)}, &stats, &progress); std::ifstream file(filename); nlohmann::json from_file{}; file >> from_file; @@ -146,7 +146,7 @@ TEST_CASE("origins creation", "[result_map]") { 0}])"_json; auto filename = (GetTestDir() / "test_with_origins.graph").string(); - map.ToFile(filename, &stats, &progress); + map.ToFile({std::filesystem::path(filename)}, &stats, &progress); std::ifstream file(filename); nlohmann::json from_file{}; file >> from_file; @@ -182,7 +182,8 @@ TEST_CASE("blobs uniqueness", "[result_map]") { {"trees", nlohmann::json::object()}}); auto filename = (GetTestDir() / "test_unique_blobs.graph").string(); - map.ToFile(filename, &stats, &progress); + map.ToFile( + {std::filesystem::path(filename)}, &stats, &progress); std::ifstream file(filename); nlohmann::json from_file{}; file >> from_file; -- cgit v1.2.3