summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-02-26 10:16:30 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-03-10 16:28:59 +0100
commitd53358c350898091d9cf2ba76ccdfa9e590275ee (patch)
tree46f7e89bbc18dd3df3039a08a757c3b622d7cb1c /test
parentd1cfcdcb8909f35cdd1591dda099a5370648bbba (diff)
downloadjustbuild-d53358c350898091d9cf2ba76ccdfa9e590275ee.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/buildtool/build_engine/target_map/result_map.test.cpp7
1 files changed, 4 insertions, 3 deletions
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</*kIncludeOrigins=*/false>(filename, &stats, &progress);
+ map.ToFile</*kIncludeOrigins=*/false>(
+ {std::filesystem::path(filename)}, &stats, &progress);
std::ifstream file(filename);
nlohmann::json from_file{};
file >> from_file;