From 8d05b1cda1b26b4ba134f114b9424446b410ac76 Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Tue, 14 Jun 2022 09:27:41 -0500 Subject: ci: Add n310 into devtests This commit adds support for reimaging n3xx devices and running devtest against a n310. This uses Labgrid to control an sdmux, which we then reimage the device. In the future, other devices can use this support to run other tests. Signed-off-by: Steven Koo --- .ci/templates/job-uhd-devtest.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to '.ci/templates/job-uhd-devtest.yml') diff --git a/.ci/templates/job-uhd-devtest.yml b/.ci/templates/job-uhd-devtest.yml index dffcb0e74..24d1985bf 100644 --- a/.ci/templates/job-uhd-devtest.yml +++ b/.ci/templates/job-uhd-devtest.yml @@ -65,6 +65,14 @@ jobs: destinationFolder: $(Build.BinariesDirectory) cleanDestinationFolder: true + - download: ${{ parameters.uhdArtifactSource }} + artifact: $(devType)-images + # Only sync the bz2 sdimg since the bmap + # is incompatible with mender + patterns: '**/*.bz2' + displayName: Download $(devType)-images artifact + condition: and(succeeded(), eq(variables.devType, 'n3xx')) + - script: | cd $(Build.BinariesDirectory)/uhddev/build mkdir -p fpga_images @@ -77,6 +85,27 @@ jobs: fi displayName: Download FPGA Images + - script: | + mkdir -p $(Common.TestResultsDirectory)/devtest + cd $(Common.TestResultsDirectory)/devtest + 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 + export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build/fpga_images + python3 ${{ parameters.uhdSrcDir }}/.ci/utils/mutex_hardware.py \ + --sdimage $(devType),$(devModel),$(uhd_artifact_directory)/$(devType)-images/$(devSDImage),${{ parameters.uhdSrcDir }}/$(devLabgridConfig),$(devHostname) \ + --fpgas $(devFpga) \ + --sfp_addrs $(sfpAddrs) \ + ${{ parameters.redisHost }} $(devName) \ + "$(Build.BinariesDirectory)/uhddev/build/utils/uhd_usrp_probe --args addr=$(devAddr)" \ + "python3 ${{ parameters.uhdSrcDir }}/host/tests/devtest/run_testsuite.py \ + --src-dir ${{ parameters.uhdSrcDir }}/host/tests/devtest \ + --devtest-pattern $(devtestPattern) --args addr=$(devAddr),type=$(devType) \ + --build-type Release --build-dir $(Build.BinariesDirectory)/uhddev/build \ + --python-interp python3 --xml" + continueOnError: true + condition: and(succeeded(), eq(variables.devType, 'n3xx'), eq(variables.devBus, 'ip')) + displayName: Run n3xx devtest on $(devName) + - script: | mkdir -p $(Common.TestResultsDirectory)/devtest cd $(Common.TestResultsDirectory)/devtest @@ -102,7 +131,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 }}/.ci/utils/mutex_hardware.py \ - --jtag_x3xx $(jtagServer),$(jtagSerial),$(devModel),$(Build.BinariesDirectory)/uhddev/build/fpga_images/ \ + --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)" \ -- cgit v1.2.3