From cbc41eaf66ef93f0b16b13a0d4bfa6b110e7dca2 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 28 Nov 2019 23:19:41 -0500 Subject: [PATCH] Clean up and try to use ctest for OS X and Windows. --- .ci/linux-steps.yaml | 3 --- .ci/macos-steps.yaml | 20 +++++++------------- .ci/windows-steps.yaml | 15 ++++++++------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.ci/linux-steps.yaml b/.ci/linux-steps.yaml index 2aa1d8a13a..46c4828b23 100644 --- a/.ci/linux-steps.yaml +++ b/.ci/linux-steps.yaml @@ -56,9 +56,6 @@ steps: - script: cd build && ctest -T Test . displayName: 'Run tests via ctest' -- script: find build/ - displayName: 'List build directory.' - # Publish test results to Azure Pipelines - task: PublishTestResults@2 inputs: diff --git a/.ci/macos-steps.yaml b/.ci/macos-steps.yaml index 50486c7a87..71d72b98e8 100644 --- a/.ci/macos-steps.yaml +++ b/.ci/macos-steps.yaml @@ -36,27 +36,21 @@ steps: - script: cd build && make -j2 displayName: 'Build' -# Run tests -- script: cd build && bin/mlpack_test --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt - displayName: 'Run tests' - -# Process test results -- bash: | - python conf/ci/convert.py > mlpack_test.xml - displayName: 'Process test results' +# Run tests via ctest. +- script: cd build && ctest -T Test . + displayName: 'Run tests via ctest' # Publish test results to Azure Pipelines - task: PublishTestResults@2 inputs: - testResultsFormat: JUnit - testResultsFiles: 'mlpack_test.xml' + testResultsFormat: cTest + testResultsFiles: build/Testing/*/Test.xml failTaskOnFailedTests: true displayName: 'Publish tests' # Publish build artifacts to Azure Pipelines - task: PublishBuildArtifacts@1 inputs: - pathtoPublish: 'mlpack_test.xml' - artifactName: 'mlpack_test_macos.xml' + pathtoPublish: 'build/Testing/' + artifactName: 'Tests' displayName: 'Publish artifacts test results' - diff --git a/.ci/windows-steps.yaml b/.ci/windows-steps.yaml index d9561ae830..748fa27ff8 100644 --- a/.ci/windows-steps.yaml +++ b/.ci/windows-steps.yaml @@ -95,10 +95,11 @@ steps: Release/mlpack_test.exe --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt displayName: 'Run tests' -# Process test results +# Run tests via ctest. - bash: | - python conf/ci/convert.py > mlpack_test.xml - displayName: 'Process test results' + cd build + ctest -T Test . + displayName: 'Run tests via ctest' # Copy artifacts - powershell: | @@ -138,14 +139,14 @@ steps: displayName: 'Publish artifacts complete' - task: PublishBuildArtifacts@1 inputs: - pathtoPublish: 'mlpack_test.xml' - artifactName: $(ArchiveTests) + pathtoPublish: 'build/Testing/' + artifactName: 'Tests' displayName: 'Publish artifacts test results' # Publish test results to Azure Pipelines - task: PublishTestResults@2 inputs: - testResultsFormat: JUnit - testResultsFiles: 'mlpack_test.xml' + testResultsFormat: cTest + testResultsFiles: build/Testing/*/Test.xml failTaskOnFailedTests: true displayName: 'Publish tests'