ci: mutex_hardware: remove vivado_dir parameter

This commit is contained in:
Frank Dietze 2026-09-17 09:29:18 +02:00 committed by Frank Dietze
parent 2fa91b605a
commit a48ccdb0a0
7 changed files with 29 additions and 26 deletions

View File

@ -24,7 +24,6 @@ jobs:
uhdFpgaArtifactSource: '${{ parameters.uhdFpgaArtifactSource }}'
fpga_imgs_source: '${{ parameters.fpga_imgs_source }}'
redisHost: 'sdr-rhombus'
vivado_dir: '/opt/Xilinx/Vivado_Lab/2020.1/'
dutMatrix:
${{ if contains(parameters.testDevices, 'x3xx') }}:
rhombus-x300-UBX-0:

View File

@ -24,7 +24,6 @@ jobs:
uhdFpgaArtifactSource: '${{ parameters.uhdFpgaArtifactSource }}'
fpga_imgs_source: '${{ parameters.fpga_imgs_source }}'
redisHost: 'dre-s175'
vivado_dir: $(xilinx_location)
dutMatrix:
${{ if contains(parameters.testDevices, 'b2xx') }}:
sdr-s175-dev-tests-b206-0:
@ -54,7 +53,6 @@ jobs:
uhdFpgaArtifactSource: '${{ parameters.uhdFpgaArtifactSource }}'
fpga_imgs_source: '${{ parameters.fpga_imgs_source }}'
redisHost: 'dre-s175'
vivado_dir: $(xilinx_location)
dutMatrix:
${{ if contains(parameters.testDevices, 'x3xx') }}:
sdr-s175-dev-tests-x310-4:

View File

@ -21,7 +21,6 @@ jobs:
uhdFpgaArtifactSource: '${{ parameters.uhdFpgaArtifactSource }}'
fpga_imgs_source: '${{ parameters.fpga_imgs_source }}'
redisHost: $(host_redisHost)
vivado_dir: '/opt/Xilinx/Vivado_Lab/2023.2/'
dutMatrix:
x310-OBX:
devAgent: osmium

View File

@ -20,9 +20,6 @@ parameters:
default: ''
- name: dutMatrix
type: object
- name: vivado_dir
type: string
default: ''
jobs:
- job: uhd_devtest_${{ parameters.suiteName }}
@ -219,6 +216,7 @@ jobs:
displayName: Run b2xx devtest on $(devName)
- script: |
echo PATH: $PATH
cd $(Agent.TempDirectory)
python3 -m venv devtest_venv
source devtest_venv/bin/activate
@ -230,7 +228,7 @@ jobs:
export PATH=$(Build.BinariesDirectory)/uhddev/build/utils:$(Build.BinariesDirectory)/uhddev/build/examples:$PATH
export LD_LIBRARY_PATH=$(Build.BinariesDirectory)/uhddev/build/lib:$LD_LIBRARY_PATH
python3 ${{ parameters.uhdSrcDir }}/uhddev/.ci/utils/mutex_hardware.py \
--jtag_x3xx $(devType),$(devModel),$(jtagServer),$(jtagSerial),$(Build.BinariesDirectory)/uhddev/build/fpga_images/,${{ parameters.vivado_dir }} \
--jtag_x3xx $(devType),$(devModel),$(jtagServer),$(jtagSerial),$(Build.BinariesDirectory)/uhddev/build/fpga_images/ \
--fpgas $(devFpga) \
"${{ parameters.redisHost }}" "$(devName)" \
"$(Build.BinariesDirectory)/uhddev/build/utils/uhd_usrp_probe --args addr=$(devAddr)" \

View File

@ -25,7 +25,6 @@ jobs:
uhdFpgaArtifactSource: ${{ parameters.uhdFpgaArtifactSource }}
fpga_imgs_source: '${{ parameters.fpga_imgs_source }}'
redisHost: $(host_redisHost)
vivado_dir: '/opt/Xilinx/Vivado_Lab/2023.2/'
extra_rf_test_args: '${{ parameters.extra_rf_test_args }}'
dutMatrix:
x310-obx-0:

View File

@ -16,9 +16,6 @@ parameters:
default: ''
- name: dutMatrix
type: object
- name: vivado_dir
type: string
default: ''
- name: extra_rf_test_args
type: string
default: ''
@ -245,7 +242,7 @@ jobs:
$(parameters.extra_rf_test_args)" || rf_test_status=$?
elif [ "$(devType)" = "x300" ]; then
python3 ${{ parameters.uhdSrcDir }}/.ci/utils/mutex_hardware.py \
--jtag_x3xx $(devType),$(devModel),$(jtagServer),$(jtagSerial),$(Build.BinariesDirectory)/uhddev/build/fpga_images/,${{ parameters.vivado_dir }} \
--jtag_x3xx $(devType),$(devModel),$(jtagServer),$(jtagSerial),$(Build.BinariesDirectory)/uhddev/build/fpga_images/ \
--fpgas $(devFpga) \
--sfp_addrs $(sfpAddrs) \
"${{ parameters.redisHost }}" "$(devName)" \
@ -265,11 +262,20 @@ jobs:
--results_path $(Common.TestResultsDirectory)/pytest/rf/$(devFpga) ${{ parameters.extra_rf_test_args }} || rf_test_status=$?
cd $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests
fi
python3 automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) \
--test_selector $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/pytests_non_rf \
--results_path $(Common.TestResultsDirectory)/pytest/non_rf/$(devFpga) \
--run_vars_overrides "mgmt_addr=$(devAddr)" --run_vars_overrides "addr=$(devAddr)" \
${{ parameters.extra_rf_test_args }} || non_rf_test_status=$?
# only if devBus is "ip" then we need to run the non-rf tests with the same mgmt_addr and addr overrides as the rf tests
if [ "$(devBus)" = "ip" ]; then
python3 automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) \
--test_selector $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/pytests_non_rf \
--results_path $(Common.TestResultsDirectory)/pytest/non_rf/$(devFpga) \
--run_vars_overrides "mgmt_addr=$(devAddr)" --run_vars_overrides "addr=$(devAddr)" \
${{ parameters.extra_rf_test_args }} || non_rf_test_status=$?
else
python3 automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) \
--test_selector $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/pytests_non_rf \
--results_path $(Common.TestResultsDirectory)/pytest/non_rf/$(devFpga) \
${{ parameters.extra_rf_test_args }} || non_rf_test_status=$?
fi
if [ $rf_test_status -ne 0 ] || [ $non_rf_test_status -ne 0 ]; then
echo "At least one pytest invocation failed (rf=$rf_test_status, non_rf=$non_rf_test_status)."

View File

@ -12,6 +12,7 @@ import shlex
import subprocess
import sys
import time
import shutil
import labgrid
from fabric import Connection
@ -52,17 +53,21 @@ class AcquiredPlace:
subprocess.run(["labgrid-client", "-c", self.config, "release"])
def jtag_x3xx(
dev_type, dev_model, jtag_server, jtag_serial, fpga_folder, fpga, redis_server, vivado_dir
):
def jtag_x3xx(dev_type, dev_model, jtag_server, jtag_serial, fpga_folder, fpga, redis_server):
"""Download the bitfile to the FPGA using jtag interface."""
if dev_model not in ["x300", "x310"]:
raise RuntimeError(f"{dev_type} not supported with jtag_x3xx")
remote_working_dir = "pipeline_fpga"
vivado_lab_path = os.path.join(vivado_dir, "bin/vivado_lab")
vivado_program_jtag = "{} -mode batch -source {}/viv_hardware_utils.tcl -nolog -nojournal -tclargs program".format(
vivado_lab_path, remote_working_dir
vivado_lab = shutil.which("vivado_lab")
if vivado_lab is None:
raise RuntimeError("vivado_lab is not available on PATH")
vivado_program_jtag = (
f"{shlex.quote(vivado_lab)} -mode batch "
f"-source {remote_working_dir}/viv_hardware_utils.tcl "
"-nolog -nojournal -tclargs program"
)
print("Waiting on jtag mutex for {}".format(jtag_server), flush=True)
with Redlock(
key="hw_jtag_{}".format(jtag_server), masters=redis_server, auto_release_time=1000 * 60 * 5
@ -329,7 +334,7 @@ def main(args):
os.chdir(os.path.join(working_dir, fpga))
if args.jtag_x3xx:
dev_type, dev_model, jtag_server, jtag_serial, fpga_folder, vivado_dir = (
dev_type, dev_model, jtag_server, jtag_serial, fpga_folder = (
args.jtag_x3xx.split(",")
)
jtag_x3xx(
@ -340,7 +345,6 @@ def main(args):
fpga_folder,
fpga,
get_redis_server(args),
vivado_dir,
)
if dev_type and dev_type in ["n3xx", "e3xx"]: