mirror of
https://github.com/logos-co/eth-lez-atomic-swaps.git
synced 2026-08-27 18:01:10 +00:00
test(basecamp): recognize bundled Linux host binaries
This commit is contained in:
@@ -70,7 +70,12 @@ function formatProcessTree(rootPid) {
|
||||
|
||||
function moduleCommand(rows, executable, moduleName) {
|
||||
const escaped = moduleName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
const expression = new RegExp(`(?:^|/)${executable}(?:\\s|$).*--name(?:=|\\s+)${escaped}(?:\\s|$)`);
|
||||
const escapedExecutable = executable.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
// Bundle wrappers use the public executable name, while Linux process
|
||||
// command lines expose the wrapped ELF basename (for example,
|
||||
// `.logos_host.elf`). Both are the same Basecamp-owned host path.
|
||||
const executableBasename = `(?:${escapedExecutable}|\\.${escapedExecutable}\\.elf)`;
|
||||
const expression = new RegExp(`(?:^|/)${executableBasename}(?:\\s|$).*--name(?:=|\\s+)${escaped}(?:\\s|$)`);
|
||||
return rows.find((row) => expression.test(row.command));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user