diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-06-13 10:14:33 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-06-15 17:21:26 +0200 |
commit | 8d77b24503fcddce8f79f138cf07be5ad7eb8473 (patch) | |
tree | c39741cfafe3dce1d9a32dd9fd703621d384aee5 /src/buildtool/common/action_description.hpp | |
parent | fe336454e17bd228524c5575a3b5a641b3b10dc7 (diff) | |
download | justbuild-8d77b24503fcddce8f79f138cf07be5ad7eb8473.tar.gz |
action data structure: support (additional) execution properties
Diffstat (limited to 'src/buildtool/common/action_description.hpp')
-rw-r--r-- | src/buildtool/common/action_description.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/buildtool/common/action_description.hpp b/src/buildtool/common/action_description.hpp index 9f4583bf..621e3a12 100644 --- a/src/buildtool/common/action_description.hpp +++ b/src/buildtool/common/action_description.hpp @@ -143,6 +143,13 @@ class ActionDescription { } timeout_scale = *timeout_scale_it; } + auto const execution_properties = + optional_key_value_reader(desc, "execution properties"); + if (not execution_properties.is_object()) { + Logger::Log(LogLevel::Error, + "Execution properties have to a map"); + return std::nullopt; + } return std::make_shared<ActionDescription>( std::move(*outputs), @@ -152,7 +159,8 @@ class ActionDescription { env, may_fail, no_cache, - timeout_scale}, + timeout_scale, + execution_properties}, inputs); } catch (std::exception const& ex) { Logger::Log( @@ -194,6 +202,9 @@ class ActionDescription { if (action_.TimeoutScale() != 1.0) { json["timeout scaling"] = action_.TimeoutScale(); } + if (not action_.ExecutionProperties().empty()) { + json["execution properties"] = action_.ExecutionProperties(); + } return json; } |