def test_ValgrindOption(self):
# Make sure that valgrind exists and is in the path
valgrind = scatest.which('valgrind')
if not valgrind:
raise RuntimeError('Valgrind is not installed')
# Let the device manager find valgrind on the path
self._test_Valgrind('')
# Set an explicit path to valgrind, using a symbolic link to a non-path
# location as an additional check
altpath = os.path.join(scatest.getSdrPath(), 'valgrind')
os.symlink(valgrind, altpath)
# patch for ubuntu valgrind script
ub_patch=False
try:
if 'UBUNTU' in platform.linux_distribution()[0].upper():
ub_patch=True
valgrind_bin = scatest.which('valgrind.bin')
os.symlink(valgrind_bin, altpath+'.bin')
except:
pass
try:
self._test_Valgrind(altpath)
finally:
os.unlink(altpath)
if ub_patch:
os.unlink(altpath+'.bin')
test_01_DeviceManager.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录