Skip to content

Commit 29414b2

Browse files
committed
Added -traits to dotnet test when called for.
1 parent ef106af commit 29414b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build/build.fsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ Target "TestNet45" (fun _ ->
196196
Target "TestNetStandard15" (fun _ ->
197197
for project in dotNetTestProjects do
198198
DotnetRestore id project
199-
let args = sprintf "test %s" project
199+
let traitArg =
200+
match getBuildParamOrDefault "Category" "" with
201+
| "" -> ""
202+
| category -> sprintf "-trait \"Category=%s\"" category
203+
let args = sprintf "test %s %s" project traitArg
200204
let result = Dotnet DotnetOptions.Default args
201205
if not result.OK then failwithf "dotnet test failed with code %i" result.ExitCode
202206
)

0 commit comments

Comments
 (0)