aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp3/tools/utils/run_testbenches.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-12-01 18:50:12 +0100
committerWade Fife <wade.fife@ettus.com>2021-01-04 13:28:36 -0600
commitca68195b5d12c5410cfac8d459a0b0902c4c72c7 (patch)
treed50d2bd7541000fa0a0470c4f1f4610c93d3b410 /fpga/usrp3/tools/utils/run_testbenches.py
parent3b9ced8f07c068faf1f494ce170cb44edaa47075 (diff)
downloaduhd-ca68195b5d12c5410cfac8d459a0b0902c4c72c7.tar.gz
uhd-ca68195b5d12c5410cfac8d459a0b0902c4c72c7.tar.bz2
uhd-ca68195b5d12c5410cfac8d459a0b0902c4c72c7.zip
fpga: Remove Python2 support from build system
- 2to3 was used to convert the Python scripts, except where the tool choked and manual intervention was required - All references to "python" where replaced with "python3" - buffer() was replaced by memoryview()
Diffstat (limited to 'fpga/usrp3/tools/utils/run_testbenches.py')
-rwxr-xr-xfpga/usrp3/tools/utils/run_testbenches.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/fpga/usrp3/tools/utils/run_testbenches.py b/fpga/usrp3/tools/utils/run_testbenches.py
index 70cafeffd..c416f7f91 100755
--- a/fpga/usrp3/tools/utils/run_testbenches.py
+++ b/fpga/usrp3/tools/utils/run_testbenches.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
#
# Copyright 2018 Ettus Research, a National Instruments Company
#
@@ -11,7 +11,6 @@ import sys
import subprocess
import logging
import re
-import io
import time
import datetime
from queue import Queue
@@ -106,7 +105,7 @@ def gather_target_sims(basedir, targets, excludes):
def parse_output(simout):
# Gather results (basic metrics)
- results = {'retcode':RETCODE_SUCCESS, 'stdout':simout, 'passed':False}
+ results = {'retcode': RETCODE_SUCCESS, 'stdout': simout, 'passed': False}
# Look for the following in the log:
# - A start timestamp (indicates that Vivado started)
# - The testbench infrastructure start header (indicates that the TB started)
@@ -201,7 +200,11 @@ def run_sim(path, simulator, basedir, setupenv):
setupenv = ''
# Check if environment was setup
if 'VIVADO_PATH' not in os.environ:
- return {'retcode': RETCODE_EXEC_ERR, 'passed':False, 'stdout':bytes('Simulation environment was not initialized\n', 'utf-8')}
+ return {
+ 'retcode': RETCODE_EXEC_ERR,
+ 'passed': False,
+ 'stdout': bytes('Simulation environment was not initialized\n', 'utf-8')
+ }
else:
setupenv = '. ' + os.path.realpath(setupenv) + ';'
# Run the simulation