aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/devtest/usrp_probe.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-05-09 10:14:17 -0700
committerMartin Braun <martin.braun@ettus.com>2016-05-09 10:36:36 -0700
commit6b7b88102a1a8be1e8deaa1e63dc9ede4b5131b7 (patch)
tree28910a3845fd42ab1b986d36e386a1e349684c00 /host/tests/devtest/usrp_probe.py
parent30c3a9f0d5ef628855b9cbd0c68b6a92f238e03b (diff)
downloaduhd-6b7b88102a1a8be1e8deaa1e63dc9ede4b5131b7.tar.gz
uhd-6b7b88102a1a8be1e8deaa1e63dc9ede4b5131b7.tar.bz2
uhd-6b7b88102a1a8be1e8deaa1e63dc9ede4b5131b7.zip
devtest: Fix $PATH-setting code
PATH was only set for the examples, but not for the initial call to uhd_find_devices. This reverts commit b7c296f58399f0ef1fee7b3ef3d7da957f551558, which tried to fix this but did so badly, and also amends it with the correct fix.
Diffstat (limited to 'host/tests/devtest/usrp_probe.py')
-rw-r--r--host/tests/devtest/usrp_probe.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/tests/devtest/usrp_probe.py b/host/tests/devtest/usrp_probe.py
index c734f48a1..50d484518 100644
--- a/host/tests/devtest/usrp_probe.py
+++ b/host/tests/devtest/usrp_probe.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2015 Ettus Research LLC
+# Copyright 2015-2016 Ettus Research LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,13 +20,13 @@
import re
import subprocess
-def get_usrp_list(device_filter=None):
+def get_usrp_list(device_filter=None, env=None):
""" Returns a list of dicts that contain USRP info """
try:
+ cmd = ['uhd_find_devices']
if device_filter is not None:
- output = subprocess.check_output(['../../utils/uhd_find_devices', '--args', device_filter])
- else:
- output = subprocess.check_output('../../utils/uhd_find_devices')
+ cmd += ['--args', device_filter]
+ output = subprocess.check_output(cmd, env=env)
except subprocess.CalledProcessError:
return []
split_re = "\n*-+\n-- .*\n-+\n"