diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-05 15:11:03 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-05 16:15:00 +0200 |
commit | e1cfd6e1d913244d93fc170b6d4cf02638117230 (patch) | |
tree | 38299837524b3cac25ceec5a793fa17705ad4bdc | |
parent | 6b31a88acbe6a6556e36f838b914a82879949811 (diff) | |
download | justbuild-e1cfd6e1d913244d93fc170b6d4cf02638117230.tar.gz |
Executor: Log action outputs sorted by path
...also on failure or warning.
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 2d86a405..f009783d 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -709,8 +709,10 @@ class ExecutorImpl { return false; } - auto const output_files = action->OutputFilePaths(); - auto const output_dirs = action->OutputDirPaths(); + auto output_files = action->OutputFilePaths(); + auto output_dirs = action->OutputDirPaths(); + std::sort(output_files.begin(), output_files.end()); + std::sort(output_dirs.begin(), output_dirs.end()); if (artifacts.value()->empty() or not CheckOutputsExist( @@ -744,13 +746,13 @@ class ExecutorImpl { auto base = action->Content().Cwd(); message << *(action->MayFail()) << " (exit code " << response->ExitCode() << "); outputs:"; - for (auto const& [name, node] : action->OutputFiles()) { + for (auto const& name : output_files) { message << "\n - " << nlohmann::json(name).dump() << " " << artifacts.value() ->at(RebasePathStringRelativeTo(base, name)) .ToString(); } - for (auto const& [name, node] : action->OutputDirs()) { + for (auto const& name : output_dirs) { message << "\n - " << nlohmann::json(name).dump() << " " << artifacts.value() ->at(RebasePathStringRelativeTo(base, name)) |