@@ -227,6 +227,7 @@ function Start-TestRun
227
227
$env: PSREADLINE_TESTRUN = 1
228
228
Push-Location " $RepoRoot /test"
229
229
230
+ $xUnitTestExecuted = $true
230
231
if ($IsWindowsEnv )
231
232
{
232
233
if ($env: APPVEYOR -or $env: TF_BUILD )
@@ -246,6 +247,8 @@ function Start-TestRun
246
247
247
248
try
248
249
{
250
+ $xUnitTestExecuted = $false
251
+
249
252
# Remember the current keyboard layout, changes are system wide and restoring
250
253
# is the nice thing to do.
251
254
$savedLayout = [KeyboardLayoutHelper ]::GetCurrentKeyboardLayout()
@@ -266,6 +269,11 @@ function Start-TestRun
266
269
# We have to use Start-Process so it creates a new window, because the keyboard
267
270
# layout change won't be picked up by any processes running in the current conhost.
268
271
RunXunitTestsInNewProcess - Layout $layout - OperatingSystem ' Windows'
272
+ $xUnitTestExecuted = $true
273
+ }
274
+ else
275
+ {
276
+ Write-Log " Testing not supported for the keyboard layout '$layout '."
269
277
}
270
278
}
271
279
}
@@ -281,8 +289,11 @@ function Start-TestRun
281
289
RunXunitTestsInNewProcess - Layout ' en-US' - OperatingSystem ' Linux'
282
290
}
283
291
284
- # Check to see if there were any failures in xUnit tests, and throw exception to fail the build if so.
285
- Get-ChildItem $testResultFolder | Test-XUnitTestResults > $null
292
+ if ($xUnitTestExecuted )
293
+ {
294
+ # Check to see if there were any failures in xUnit tests, and throw exception to fail the build if so.
295
+ Get-ChildItem $testResultFolder | Test-XUnitTestResults > $null
296
+ }
286
297
}
287
298
finally
288
299
{
0 commit comments