From 8a4a900f93a704f18d5489b682508840a8cda179 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 30 Jan 2024 16:07:49 +0100 Subject: just-mrrc: support remote-execution properties While just-mr does not use remote-execution properties, it is still useful to have those as a separate entry in the rc file. With rc-file delegation, this gives committed rc files an easy way to specify the image to be used without having to set all the remaining arguments for the various just subcommands in "just args". --- src/other_tools/just_mr/rc.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/other_tools/just_mr/rc.cpp') diff --git a/src/other_tools/just_mr/rc.cpp b/src/other_tools/just_mr/rc.cpp index 209e4be6..8985c958 100644 --- a/src/other_tools/just_mr/rc.cpp +++ b/src/other_tools/just_mr/rc.cpp @@ -359,6 +359,30 @@ namespace { clargs->just_cmd.just_args[cmd_name] = std::move(args); } } + // read remote-execution properties, used for extending the launch + // command-line (not settable on just-mr's command line). + auto re_props = rc_config["remote-execution properties"]; + if (re_props.IsNotNull()) { + if (not re_props->IsList()) { + Logger::Log(LogLevel::Error, + "Configuration-file provided remote-execution " + "properties have to be a list of strings, but found {}", + re_props->ToString()); + std::exit(kExitConfigError); + } + for (auto const& entry : re_props->List()) { + if (not entry->IsString()) { + Logger::Log( + LogLevel::Error, + "Configuration-file provided remote-execution properties " + "have to be a list of strings, but found entry {}", + entry->ToString()); + std::exit(kExitConfigError); + } + clargs->launch_fwd.remote_execution_properties.emplace_back( + entry->String()); + } + } // read default for local launcher if (not clargs->common.local_launcher) { auto launcher = rc_config["local launcher"]; -- cgit v1.2.3