summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/pkt_gen/testcenter/testcenter.py2
-rw-r--r--tools/tasks.py7
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/pkt_gen/testcenter/testcenter.py b/tools/pkt_gen/testcenter/testcenter.py
index 4ba5bc89..f670612c 100644
--- a/tools/pkt_gen/testcenter/testcenter.py
+++ b/tools/pkt_gen/testcenter/testcenter.py
@@ -127,7 +127,7 @@ class TestCenter(trafficgen.ITrafficGenerator):
verbose = True
print("Arguments used to call test: %s" % args)
- subprocess.check_call(args)
+ subprocess.check_call(map(os.path.expanduser, args))
file = os.path.join(settings.getValue("TRAFFICGEN_STC_RESULTS_DIR"),
settings.getValue("TRAFFICGEN_STC_CSV_RESULTS_FILE_PREFIX") + ".csv")
diff --git a/tools/tasks.py b/tools/tasks.py
index 33a5931a..09dd88dd 100644
--- a/tools/tasks.py
+++ b/tools/tasks.py
@@ -75,8 +75,9 @@ def run_task(cmd, logger, msg=None, check_error=False):
logger.debug('%s%s', CMD_PREFIX, ' '.join(cmd))
try:
- proc = subprocess.Popen(
- cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
+ proc = subprocess.Popen(map(os.path.expanduser, cmd),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, bufsize=0)
while True:
reads = [proc.stdout.fileno(), proc.stderr.fileno()]
@@ -121,7 +122,7 @@ def run_background_task(cmd, logger, msg):
logger.info(msg)
logger.debug('%s%s', CMD_PREFIX, ' '.join(cmd))
- proc = subprocess.Popen(cmd, stdout=_get_stdout(), bufsize=0)
+ proc = subprocess.Popen(map(os.path.expanduser, cmd), stdout=_get_stdout(), bufsize=0)
return proc.pid