Skip to content

Commit

Permalink
run-tests-on-os.yml: Get file paths only
Browse files Browse the repository at this point in the history
  • Loading branch information
NightOwl888 committed Jul 25, 2019
1 parent 99e2f92 commit 7ed3551
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions ICU4N.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "azure-templates", "azure-te
build\azure-templates\publish-test-results.yml = build\azure-templates\publish-test-results.yml
build\azure-templates\run-tests-on-os.yml = build\azure-templates\run-tests-on-os.yml
build\azure-templates\show-all-environment-variables.yml = build\azure-templates\show-all-environment-variables.yml
build\azure-templates\show-all-files.yml = build\azure-templates\show-all-files.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CF2F2031-FCC4-401C-9D58-96D0245C1A41}"
Expand Down
3 changes: 1 addition & 2 deletions build/azure-templates/publish-test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ steps:
EnsureNotNullOrEmpty('${{ parameters.testResultsFileName }}', 'testResultsFileName')
displayName: 'Validate Template Parameters'

- powershell: cd ..;dir -r | % { if ($_.PsIsContainer) { $_.FullName + "\" } else { $_.FullName } }
displayName: 'Show all files'
- template: 'show-all-files.yml'

- powershell: |
$testResultsFileName = "$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}/${{ parameters.osName }}/${{ parameters.framework }}/${{ parameters.testProjectName }}/${{ parameters.testResultsFileName }}"
Expand Down
5 changes: 2 additions & 3 deletions build/azure-templates/run-tests-on-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ steps:
function RunTests([string]$framework, [string]$fileRegexPattern) {
if (!(IsSupportedFramework($framework))) { continue }
$testBinaries = Get-ChildItem -Path "$testBinaryRootDirectory" -Recurse | Where-Object {$_.FullName -match "$framework"} | Where-Object {$_.FullName -match "$fileRegexPattern"} | Select-Object { $_.FullName }
$testBinaries = Get-ChildItem -Path "$testBinaryRootDirectory" -File -Recurse | Where-Object {$_.FullName -match "$framework"} | Where-Object {$_.FullName -match "$fileRegexPattern"} | Select-Object { $_.FullName }
foreach ($testBinary in $testBinaries) {
$testName = [System.IO.Path]::GetFileNameWithoutExtension($testBinary)
Expand Down Expand Up @@ -137,8 +137,7 @@ steps:
errorActionPreference: 'continue'
failOnStderr: false

- powershell: cd ..;dir -r | % { if ($_.PsIsContainer) { $_.FullName + "\" } else { $_.FullName } }
displayName: 'Show all files'
- template: 'show-all-files.yml'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: ${{ parameters.testResultsArtifactName }}'
Expand Down
5 changes: 5 additions & 0 deletions build/azure-templates/show-all-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Writes all file names (from the parent directory) to the host (helpful for debugging)

steps:
- powershell: cd ..;dir -r | Where-Object {$_.PsIsContainer -eq $false} | % { $_.FullName }
displayName: 'Show all Files'

0 comments on commit 7ed3551

Please sign in to comment.