Skip to content

Commit

Permalink
remove race and covermode flags from test statement (Azure#15200)
Browse files Browse the repository at this point in the history
  • Loading branch information
seankane-msft authored and vindicatesociety committed Sep 18, 2021
1 parent 0a5bfa9 commit 61a3020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eng/pipelines/templates/steps/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ steps:
$testDirs = (./eng/scripts/get_test_dirs.ps1 -serviceDir $(SCOPE))
foreach ($td in $testDirs) {
pushd $td
Write-Host "##[command]Executing go test -run "^Test" -race -v -coverprofile coverage.txt -covermode atomic $td | go-junit-report -set-exit-code > report.xml"
go test -run "^Test" -race -v -coverprofile coverage.txt -covermode atomic . | go-junit-report -set-exit-code > report.xml
Write-Host "##[command]Executing go test -run "^Test" -v -coverprofile coverage.txt $td | go-junit-report -set-exit-code > report.xml"
go test -run "^Test" -v -coverprofile coverage.txt . | go-junit-report -set-exit-code > report.xml
# if no tests were actually run (e.g. examples) delete the coverage file so it's omitted from the coverage report
if (Select-String -path ./report.xml -pattern '<testsuites></testsuites>' -simplematch -quiet) {
Write-Host "##[command]Deleting empty coverage file"
Expand Down

0 comments on commit 61a3020

Please sign in to comment.