aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-03-06 02:41:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-06 02:41:27 +0000
commit10d52909b5375daf09a5024eb2b4ff98a8daa5a2 (patch)
tree83e970873cd1be5684bd239697b28d5049c562f4
parentd74de7c7b7d98fb4dd4c5f42ec0e4a5122c05539 (diff)
parent69ff43531b03b97efb031e26f812a6c1daa7b5ec (diff)
downloadcuttlefish-10d52909b5375daf09a5024eb2b4ff98a8daa5a2.tar.gz
Merge "mcu: substitute ${bin} config entries to Android host binary path" into main
-rw-r--r--host/commands/run_cvd/launch/mcu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/commands/run_cvd/launch/mcu.cpp b/host/commands/run_cvd/launch/mcu.cpp
index 96e426e7d..8076abebd 100644
--- a/host/commands/run_cvd/launch/mcu.cpp
+++ b/host/commands/run_cvd/launch/mcu.cpp
@@ -62,12 +62,14 @@ class Mcu : public vm_manager::VmmDependencyCommand {
CF_EXPECT(start.type() == Json::arrayValue,
"mcu: config: start-cmd: array expected");
CF_EXPECT(start.size() > 0, "mcu: config: empty start-cmd");
- Command command(start[0].asString());
+ Command command(android::base::StringReplace(start[0].asString(), "${bin}",
+ HostBinaryPath(""), true));
- std::string wdir = "${wdir}";
for (unsigned int i = 1; i < start.size(); i++) {
auto param = start[i].asString();
param = android::base::StringReplace(param, "${wdir}", mcu_dir_, true);
+ param = android::base::StringReplace(param, "${bin}", HostBinaryPath(""),
+ true);
command.AddParameter(param);
}