Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ament_cmake_test/ament_cmake_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import subprocess
import sys
import time
import shlex
from xml.etree.ElementTree import ElementTree
from xml.etree.ElementTree import ParseError
from xml.sax.saxutils import quoteattr
Expand Down Expand Up @@ -197,9 +198,14 @@ def log(msg, **kwargs):

start_time = time.monotonic()

cmd = args.command
if 'TEST_PREFIX' in os.environ:
os_posix = os.name == "posix"
cmd = shlex.split(os.environ['TEST_PREFIX'], os_posix) + cmd

try:
proc = subprocess.Popen(
args.command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
env=env)
while True:
line = proc.stdout.readline()
Expand Down