Skip to content

Commit ebc40a8

Browse files
committed
CSHARP-1684: Modify builds.fsx to support only executing tests of a given category.
1 parent 19f6f39 commit ebc40a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/build.fsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ Target "Test" (fun _ ->
128128
testsDir <- testsDir -- (binDir45 @@ "*VB.Tests*.dll")
129129

130130
let resultsOutputPath = testResultsDir @@ (getBuildParamOrDefault "testResults" "test-results.xml")
131+
let includeTraits =
132+
match getBuildParamOrDefault "Category" "" with
133+
| "" -> []
134+
| category -> [("Category", category)]
131135

132136
testsDir
133137
|> xUnit2 (fun p ->
@@ -136,6 +140,7 @@ Target "Test" (fun _ ->
136140
NUnitXmlOutputPath = Some resultsOutputPath
137141
Parallel = ParallelMode.NoParallelization
138142
TimeOut = TimeSpan.FromMinutes(10.0)
143+
IncludeTraits = includeTraits
139144
})
140145
)
141146

0 commit comments

Comments
 (0)