Skip to content

Commit 7b6dc6b

Browse files
committed
Change to xunit query syntax
1 parent 8efdb8f commit 7b6dc6b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

eng/Build.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,25 +381,25 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str
381381
# MTP requires --solution flag for .sln files
382382
$testTarget = if ($testProject.EndsWith('.sln')) { "--solution ""$testProject""" } else { "--project ""$testProject""" }
383383

384-
$args = "test $testTarget -c $configuration -f $targetFramework --report-xunit-trx --report-xunit-trx-filename ""$testLogFileName"" --results-directory ""$testResultsDir"" /bl:$testBinLogPath"
384+
$test_args = "test $testTarget -c $configuration -f $targetFramework --report-xunit-trx --report-xunit-trx-filename ""$testLogFileName"" --results-directory ""$testResultsDir"" /bl:$testBinLogPath"
385385
# MTP HangDump extension replaces VSTest --blame-hang-timeout
386-
$args += " --hangdump --hangdump-timeout 5m --hangdump-type Full"
386+
$test_args += " --hangdump --hangdump-timeout 5m --hangdump-type Full"
387387

388388
if (-not $noVisualStudio -or $norestore) {
389-
$args += " --no-restore"
389+
$test_args += " --no-restore"
390390
}
391391

392392
if (-not $noVisualStudio) {
393-
$args += " --no-build"
393+
$test_args += " --no-build"
394394
}
395395

396-
$args += " $settings"
396+
$test_args += " $settings"
397397
if ($testBatch) {
398-
$args += " --filter batch=$testBatch"
398+
$test_args += " --filter-query /[batch=$testBatch]"
399399
}
400400

401-
Write-Host("$args")
402-
Exec-Console $dotnetExe $args
401+
Write-Host("$test_args")
402+
Exec-Console $dotnetExe $test_args
403403
}
404404

405405
function Prepare-TempDir() {

eng/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function Test() {
251251
fi
252252

253253
if [[ "$testbatch" != "" ]]; then
254-
args+=(--filter "batch=$testbatch")
254+
args+=(--filter-query "/[batch=$testbatch]")
255255
fi
256256

257257
"$DOTNET_INSTALL_DIR/dotnet" "${args[@]}" || exit $?

0 commit comments

Comments
 (0)