mirror of
https://github.com/azure-rtos/threadx
synced 2025-01-16 07:42:57 +08:00
Fix path to test reports in pipeline (#247)
* Fix path to test reports in pipeline * Fix test case when CPU starves, the thread 2 can run 14 ronuds.
This commit is contained in:
parent
0d308c7ae6
commit
4c4547d5d5
@ -19,18 +19,18 @@ steps:
|
|||||||
filePath: '$(Build.SourcesDirectory)/scripts/sdl_check.sh'
|
filePath: '$(Build.SourcesDirectory)/scripts/sdl_check.sh'
|
||||||
|
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: 'Build SMP'
|
displayName: 'Build'
|
||||||
inputs:
|
inputs:
|
||||||
filePath: '$(Build.SourcesDirectory)/scripts/build_smp.sh'
|
filePath: '$(Build.SourcesDirectory)/scripts/build_smp.sh'
|
||||||
|
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: 'Test SMP'
|
displayName: 'Test'
|
||||||
inputs:
|
inputs:
|
||||||
filePath: '$(Build.SourcesDirectory)/scripts/test_smp.sh'
|
filePath: '$(Build.SourcesDirectory)/scripts/test_smp.sh'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: 'Test SMP (PublishTestResults)'
|
displayName: 'PublishTestResults'
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'cTest'
|
testResultsFormat: 'cTest'
|
||||||
testResultsFiles: '*/Testing/**/*.xml'
|
testResultsFiles: '*/Testing/**/*.xml'
|
||||||
@ -40,14 +40,20 @@ steps:
|
|||||||
|
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: 'Test SMP (PublishTestReports)'
|
displayName: 'CopyTestReports'
|
||||||
inputs:
|
inputs:
|
||||||
SourceFolder: '$(Build.SourcesDirectory)/test/smp/cmake'
|
SourceFolder: '$(Build.SourcesDirectory)/test/smp/cmake'
|
||||||
Contents: |
|
Contents: |
|
||||||
build/*.txt
|
build/*.txt
|
||||||
build/*/Testing/**/*.xml
|
build/*/Testing/**/*.xml
|
||||||
coverage_report/**/*
|
coverage_report/**/*
|
||||||
TargetFolder: '$(ob_outputDirectory)/test_reports_SMP'
|
TargetFolder: '$(build.artifactstagingdirectory)/test_reports_SMP'
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
displayName: 'PublishBuildArtifacts'
|
||||||
|
inputs:
|
||||||
|
pathToPublish: $(build.artifactstagingdirectory)
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
- task: PublishCodeCoverageResults@1
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
@ -56,4 +62,3 @@ steps:
|
|||||||
codeCoverageTool: 'Cobertura'
|
codeCoverageTool: 'Cobertura'
|
||||||
summaryFileLocation: '$(Build.SourcesDirectory)/test/smp/cmake/coverage_report/default_build_coverage.xml'
|
summaryFileLocation: '$(Build.SourcesDirectory)/test/smp/cmake/coverage_report/default_build_coverage.xml'
|
||||||
pathToSources: '$(Build.SourcesDirectory)/test/smp/cmake'
|
pathToSources: '$(Build.SourcesDirectory)/test/smp/cmake'
|
||||||
reportDirectory: '$(Build.SourcesDirectory)/test/smp/cmake/coverage_report/default_build_coverage'
|
|
||||||
|
@ -19,18 +19,18 @@ steps:
|
|||||||
filePath: '$(Build.SourcesDirectory)/scripts/sdl_check.sh'
|
filePath: '$(Build.SourcesDirectory)/scripts/sdl_check.sh'
|
||||||
|
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: 'Build TX'
|
displayName: 'Build'
|
||||||
inputs:
|
inputs:
|
||||||
filePath: '$(Build.SourcesDirectory)/scripts/build_tx.sh'
|
filePath: '$(Build.SourcesDirectory)/scripts/build_tx.sh'
|
||||||
|
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: 'Test TX'
|
displayName: 'Test'
|
||||||
inputs:
|
inputs:
|
||||||
filePath: '$(Build.SourcesDirectory)/scripts/test_tx.sh'
|
filePath: '$(Build.SourcesDirectory)/scripts/test_tx.sh'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: 'Test TX (PublishTestResults)'
|
displayName: 'PublishTestResults'
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'cTest'
|
testResultsFormat: 'cTest'
|
||||||
testResultsFiles: '*/Testing/**/*.xml'
|
testResultsFiles: '*/Testing/**/*.xml'
|
||||||
@ -40,14 +40,20 @@ steps:
|
|||||||
|
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: 'Test TX (PublishTestReports)'
|
displayName: 'CopyTestReports'
|
||||||
inputs:
|
inputs:
|
||||||
SourceFolder: '$(Build.SourcesDirectory)/test/tx/cmake'
|
SourceFolder: '$(Build.SourcesDirectory)/test/tx/cmake'
|
||||||
Contents: |
|
Contents: |
|
||||||
build/*.txt
|
build/*.txt
|
||||||
build/*/Testing/**/*.xml
|
build/*/Testing/**/*.xml
|
||||||
coverage_report/**/*
|
coverage_report/**/*
|
||||||
TargetFolder: '$(ob_outputDirectory)/test_reports_TX'
|
TargetFolder: '$(build.artifactstagingdirectory)/test_reports_TX'
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
displayName: 'PublishBuildArtifacts'
|
||||||
|
inputs:
|
||||||
|
pathToPublish: $(build.artifactstagingdirectory)
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
- task: PublishCodeCoverageResults@1
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
@ -56,4 +62,3 @@ steps:
|
|||||||
codeCoverageTool: 'Cobertura'
|
codeCoverageTool: 'Cobertura'
|
||||||
summaryFileLocation: '$(Build.SourcesDirectory)/test/tx/cmake/coverage_report/default_build_coverage.xml'
|
summaryFileLocation: '$(Build.SourcesDirectory)/test/tx/cmake/coverage_report/default_build_coverage.xml'
|
||||||
pathToSources: '$(Build.SourcesDirectory)/test/tx/cmake'
|
pathToSources: '$(Build.SourcesDirectory)/test/tx/cmake'
|
||||||
reportDirectory: '$(Build.SourcesDirectory)/test/tx/cmake/coverage_report/default_build_coverage'
|
|
||||||
|
@ -179,8 +179,16 @@ UINT status;
|
|||||||
tx_thread_sleep(63);
|
tx_thread_sleep(63);
|
||||||
|
|
||||||
/* Check the run counters. */
|
/* Check the run counters. */
|
||||||
if (((thread_1_counter != 32) && (thread_1_counter != 33)) || /* Depending on the starting time, thread 1 can run either 32 or 33 rounds. */
|
if (((thread_1_counter != 32)
|
||||||
(thread_2_counter != 13))
|
#ifdef __linux__
|
||||||
|
&& (thread_1_counter != 33) /* Depending on the starting time, thread 1 can run either 32 or 33 rounds. */
|
||||||
|
#endif
|
||||||
|
) ||
|
||||||
|
((thread_2_counter != 13)
|
||||||
|
#ifdef __linux__
|
||||||
|
&& (thread_2_counter != 14) /* When CPU starves, the thread 2 can run 14 ronuds. */
|
||||||
|
#endif
|
||||||
|
))
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Event flag error. */
|
/* Event flag error. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user