Skip to content

Commit 3969e43

Browse files
committed
make test running conditional
1 parent 92b49fc commit 3969e43

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Build.ps1

+8-6
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ try {
4646
Pop-Location
4747
}
4848

49-
foreach ($test in Get-ChildItem test/*.Tests) {
50-
Push-Location $test
49+
if(Test-Path .\test) {
50+
foreach ($test in Get-ChildItem test/*.Tests) {
51+
Push-Location $test
5152

52-
Write-Output "build: Testing project in $test"
53+
Write-Output "build: Testing project in $test"
5354

54-
& dotnet test -c Release --no-build --no-restore
55-
if($LASTEXITCODE -ne 0) { throw "Testing failed" }
55+
& dotnet test -c Release --no-build --no-restore
56+
if($LASTEXITCODE -ne 0) { throw "Testing failed" }
5657

57-
Pop-Location
58+
Pop-Location
59+
}
5860
}
5961

6062
if ($env:NUGET_API_KEY) {

0 commit comments

Comments
 (0)