mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
ci: make changes for test_selector change in ATS
This commit is contained in:
parent
74096443d2
commit
f798a04137
@ -127,9 +127,10 @@ jobs:
|
||||
--sdimage_sdmux $(devType),$(devModel),$(uhd_artifact_directory)/$(devType)-images/$(devSDImage),${{ parameters.uhdSrcDir }}/$(devLabgridConfig),$(devHostname) \
|
||||
--fpgas $(devFpga) \
|
||||
--sfp_addrs $(sfpAddrs) \
|
||||
--working_dir "$(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/pytests/" \
|
||||
${{ parameters.redisHost }} $(devName) \
|
||||
"uhd_usrp_probe --args addr=$(devAddr)" \
|
||||
"python3 $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) \
|
||||
"python3 ../automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) \
|
||||
--results_path $(Common.TestResultsDirectory)/pytest/{fpga} ${{ parameters.extra_rf_test_args }}"
|
||||
continueOnError: true
|
||||
condition: and(succeeded(), eq(variables.devType, 'n3xx'), eq(variables.devBus, 'ip'))
|
||||
|
||||
@ -446,7 +446,7 @@ stages:
|
||||
- template: tests/job-uhd-x440-hardware-tests-saison.yml
|
||||
parameters:
|
||||
testOS: ubuntu2204
|
||||
extra_rf_test_args: --test_selector pytests/test_rx_phase_coherence.py pytests/test_tx_phase_coherence.py
|
||||
extra_rf_test_args: --test_selector test_rx_phase_coherence.py test_tx_phase_coherence.py
|
||||
testLength: ${{ parameters.testLength }}
|
||||
|
||||
- stage: test_uhd_rf_test_stage
|
||||
|
||||
@ -261,13 +261,13 @@ jobs:
|
||||
export PYTHONPATH=$GNURADIO_GRETTUS_INSTALL_PATH/lib/python3/dist-packages:$PYTHONPATH
|
||||
fi
|
||||
|
||||
cd $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests
|
||||
cd $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/pytests
|
||||
if [ ${{ parameters.warmUpAfterBoot }} > 0 ]; then
|
||||
echo 'sleeping ${{ parameters.warmUpAfterBoot }} seconds before testing...'
|
||||
sleep ${{ parameters.warmUpAfterBoot }}
|
||||
fi
|
||||
uhd_find_devices --args type=$(dutType)
|
||||
python3 automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) --results_path '$(Common.TestResultsDirectory)/pytest/host' --test_length ${{ parameters.testLength }} ${{ parameters.extra_rf_test_args }}
|
||||
python3 ../automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) --results_path '$(Common.TestResultsDirectory)/pytest/host' --test_length ${{ parameters.testLength }} ${{ parameters.extra_rf_test_args }}
|
||||
displayName: Run pytest on host
|
||||
continueOnError: true
|
||||
condition: and(succeeded(), ${{ parameters.runPyTest }})
|
||||
@ -279,7 +279,8 @@ jobs:
|
||||
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "pip3 install --upgrade pytest pytest-helpers-namespace pytest-tempdir pytest-salt"
|
||||
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "rm -rf ~/usrp_pytest && mkdir -p ~/usrp_pytest"
|
||||
scp -o StrictHostKeyChecking=no -r $(Build.SourcesDirectory)/ettus-rts/config/remote/ root@$USRP_EMB_TARGET_IP:~/usrp_pytest
|
||||
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "cd ~/usrp_pytest/remote/python_tests && python3 automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) --test_selector pytests/test_gnuradio_sanity.py --run_embedded"
|
||||
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "cd ~/usrp_pytest/remote/python_tests/pytests && \
|
||||
python3 ../automated_main.py --ats_config $(pytestAtsConfig) --dut $(pytestDUT) --test_selector test_gnuradio_sanity.py --run_embedded"
|
||||
EXITCODE=$?
|
||||
scp -o StrictHostKeyChecking=no -r root@$USRP_EMB_TARGET_IP:~/usrp_pytest .
|
||||
exit $EXITCODE
|
||||
|
||||
@ -180,5 +180,5 @@ stages:
|
||||
${{ if contains(parameters['extra_rf_test_args'], 'test_selector') }}:
|
||||
extra_rf_test_args: ${{ parameters.extra_rf_test_args }}
|
||||
${{ else }}:
|
||||
extra_rf_test_args: ${{ parameters.extra_rf_test_args }} --test_selector pytests/test_rx_phase_coherence.py pytests/test_tx_phase_coherence.py
|
||||
extra_rf_test_args: ${{ parameters.extra_rf_test_args }} --test_selector test_rx_phase_coherence.py test_tx_phase_coherence.py
|
||||
testLength: ${{ parameters.testLength }}
|
||||
|
||||
@ -243,13 +243,19 @@ def main(args):
|
||||
set_sfp_addrs(mgmt_addr, sfp_addrs)
|
||||
|
||||
for command in args.test_commands:
|
||||
result = subprocess.run(shlex.split(command.format(fpga=fpga)))
|
||||
if args.working_dir:
|
||||
result = subprocess.run(shlex.split(command.format(fpga=fpga)), cwd=args.working_dir)
|
||||
else:
|
||||
result = subprocess.run(shlex.split(command.format(fpga=fpga)))
|
||||
if(return_code == 0):
|
||||
return_code = result.returncode
|
||||
sys.exit(return_code)
|
||||
else:
|
||||
for command in args.test_commands:
|
||||
result = subprocess.run(shlex.split(command))
|
||||
if args.working_dir:
|
||||
result = subprocess.run(shlex.split(command), cwd=args.working_dir)
|
||||
else:
|
||||
result = subprocess.run(shlex.split(command))
|
||||
if(result.returncode != 0):
|
||||
sys.exit(result.returncode)
|
||||
sys.exit(0)
|
||||
@ -273,6 +279,8 @@ if __name__ == "__main__":
|
||||
help="Comma delimited list of FPGAs to test")
|
||||
parser.add_argument("--dut_timeout", type=int, default=60,
|
||||
help="Dut mutex timeout in minutes")
|
||||
parser.add_argument("--working_dir", type=str,
|
||||
help="Change working directory for commands to be run")
|
||||
parser.add_argument("redis_server", type=str,
|
||||
help="Redis server for mutex")
|
||||
parser.add_argument("dut_name", type=str,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user