Skip to content

Commit

Permalink
[Tools] Fix the issue of processing empty list in CI pipeline. (#14263)
Browse files Browse the repository at this point in the history
* Add Debug info for test phase

* Fix the issue of test project list is empty

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>
  • Loading branch information
wyunchi-ms and wyunchi-ms authored Feb 22, 2021
1 parent daf9563 commit cf3c038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
Value="@(TestCsprojList->Split(`;`)->Count())">
<Output
TaskParameter="Value"
PropertyName="IsTestListEmpty" />
PropertyName="TestCsprojListCount" />
</CreateProperty>
</Target>

Expand Down Expand Up @@ -317,7 +317,7 @@

<!-- https://github.com/Microsoft/msbuild/issues/3157#issuecomment-378002971 -->
<!-- https://github.com/xunit/xunit/issues/1154#issuecomment-405366373 -->
<Exec Command="dotnet test $(RepoArtifacts)Azure.PowerShell.sln --filter &quot;AcceptanceType=CheckIn%26RunType!=DesktopOnly&quot; --configuration $(Configuration) --framework $(TestFramework) --logger trx --results-directory &quot;$(TestOutputDirectory)&quot;" Condition="'$(IsTestListEmpty)' == 'false'" />
<Exec Command="dotnet test $(RepoArtifacts)Azure.PowerShell.sln --filter &quot;AcceptanceType=CheckIn%26RunType!=DesktopOnly&quot; --configuration $(Configuration) --framework $(TestFramework) --logger trx --results-directory &quot;$(TestOutputDirectory)&quot;" Condition="$(TestCsprojListCount) == 0" />
<Message Importance="high" Text="Finish running tests..." />
<OnError ExecuteTargets="TestFailureErrorMessage" />
</Target>
Expand Down

0 comments on commit cf3c038

Please sign in to comment.