Docker: Map command executables to device path

Change-Id: Ia8edf686a546f57b42ed0141e2986eded6f96ec1
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-10-18 12:09:55 +02:00
parent 1b24bd52b0
commit d84de31384

View File

@@ -147,7 +147,10 @@ void DockerDeviceProcess::start(const Runnable &runnable)
disconnect(&m_process); disconnect(&m_process);
m_process.setCommand(runnable.command); CommandLine command = runnable.command;
command.setExecutable(
command.executable().withNewPath(dockerDevice->mapToDevicePath(command.executable())));
m_process.setCommand(command);
m_process.setEnvironment(runnable.environment); m_process.setEnvironment(runnable.environment);
m_process.setWorkingDirectory(runnable.workingDirectory); m_process.setWorkingDirectory(runnable.workingDirectory);
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::error); connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::error);
@@ -158,7 +161,7 @@ void DockerDeviceProcess::start(const Runnable &runnable)
this, &DeviceProcess::readyReadStandardError); this, &DeviceProcess::readyReadStandardError);
connect(&m_process, &QtcProcess::started, this, &DeviceProcess::started); connect(&m_process, &QtcProcess::started, this, &DeviceProcess::started);
LOG("Running process:" << runnable.command.toUserOutput() LOG("Running process:" << command.toUserOutput()
<< "in" << runnable.workingDirectory.toUserOutput()); << "in" << runnable.workingDirectory.toUserOutput());
dockerDevice->runProcess(m_process); dockerDevice->runProcess(m_process);
} }