From f327b88b57a25732e3c94da4d0f53b08fa4b6c75 Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Thu, 10 Feb 2022 17:25:40 -0600 Subject: ci: Upload devtest logs as artifact Signed-off-by: Steven Koo --- .ci/templates/job-uhd-devtest.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to '.ci/templates') diff --git a/.ci/templates/job-uhd-devtest.yml b/.ci/templates/job-uhd-devtest.yml index 67b8cfeaf..a0e8dc137 100644 --- a/.ci/templates/job-uhd-devtest.yml +++ b/.ci/templates/job-uhd-devtest.yml @@ -32,23 +32,28 @@ jobs: matrix: ${{ parameters.dutMatrix }} workspace: clean: outputs + steps: - checkout: self clean: true + - task: InstallSSHKey@0 displayName: 'Install Ettus SSH key' inputs: knownHostsEntry: '${{ parameters.knownHost }}' sshPublicKey: '$(ettus_ssh_pubkey)' sshKeySecureFile: 'id_rsa.ettus' + - download: current artifact: uhddev-${{ parameters.testOS }}-${{ parameters.toolset }} displayName: Download pipeline artifact ${{ parameters.testOS }}-${{ parameters.toolset }} + - task: ExtractFiles@1 inputs: archiveFilePatterns: $(Pipeline.Workspace)/uhddev-${{ parameters.testOS }}-${{ parameters.toolset }}/uhddev-${{ parameters.testOS }}-${{ parameters.toolset }}.tar.gz destinationFolder: $(Build.BinariesDirectory) cleanDestinationFolder: true + - script: | cd $(Build.BinariesDirectory)/uhddev/build mkdir -p fpga_images @@ -56,6 +61,7 @@ jobs: python3 utils/uhd_images_downloader.py -t $(devModel) -i fpga_images \ -b $(sdr-fileserver) displayName: Download FPGA Images + - script: | mkdir -p $(Common.TestResultsDirectory)/devtest cd $(Common.TestResultsDirectory)/devtest @@ -73,6 +79,13 @@ jobs: continueOnError: true condition: and(succeeded(), eq(variables.devType, 'x300'), eq(variables.devBus, 'ip')) displayName: Run devtest on $(devName) $(devFpga) + + - script: | + cat $(Common.TestResultsDirectory)/devtest/log*.log + echo "" + displayName: cat devtest log + condition: always() + - script: | cd $(Common.TestResultsDirectory)/devtest python3 ${{ parameters.uhdSrcDir }}/.ci/utils/format_devtest_junitxml.py \ @@ -80,6 +93,13 @@ jobs: $(Common.TestResultsDirectory)/devtest/devtestresults.xml continueOnError: true displayName: Format devtest xml + condition: always() + + - publish: $(Common.TestResultsDirectory) + artifact: test-logs-devtest-$(devName)-$(devFpga)-run$(System.JobAttempt) + displayName: Upload Test Logs + condition: always() + - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' @@ -89,3 +109,4 @@ jobs: mergeTestResults: true failTaskOnFailedTests: true displayName: Upload devtest results + condition: always() -- cgit v1.2.3