Skip to content

Commit fc8a1fb

Browse files
Copilotxperiandri
andcommitted
build: emit trx for introspection update test target
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/75e24ea8-3ef8-4ff9-b896-387e88504c2a Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
1 parent acae3ff commit fc8a1fb

1 file changed

Lines changed: 29 additions & 11 deletions

File tree

build/Program.fs

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,36 @@ let integrationTestsProjectPath =
169169

170170
let [<Literal>] UpdateIntrospectionFileTarget = "UpdateIntrospectionFile"
171171
Target.create UpdateIntrospectionFileTarget <| fun _ ->
172-
integrationTestsProjectPath
173-
|> DotNet.test (fun options -> {
174-
options with
175-
Framework = Some DotNetMoniker
176-
Configuration = configuration
177-
Common = { DotNetCli.setVersion options.Common with CustomParams = Some "--filter FullyQualifiedName~IntrospectionUpdateTests" }
178-
MSBuildParams = {
179-
options.MSBuildParams with
180-
DisableInternalBinLog = true
181-
Verbosity = Some Normal
172+
let projectName = Path.GetFileNameWithoutExtension integrationTestsProjectPath
173+
let resultsFileName = $"{projectName}.trx"
174+
175+
DotNet.test
176+
(fun options ->
177+
{
178+
options with
179+
NoBuild = true
180+
Logger = Some $"trx;LogFileName={resultsFileName}"
181+
ResultsDirectory = Some "test-results"
182+
Framework = Some DotNetMoniker
183+
Configuration = configuration
184+
Common = {
185+
options.Common with
186+
CustomParams = Some "--filter FullyQualifiedName~IntrospectionUpdateTests"
187+
}
188+
MSBuildParams = {
189+
options.MSBuildParams with
190+
DisableInternalBinLog = true
191+
Verbosity = Some Normal
192+
Properties = [
193+
if embedAll then
194+
("DebugType", "embedded")
195+
("EmbedAllSources", "true")
196+
]
197+
}
182198
}
183-
})
199+
|> _.WithRedirectOutput(true)
200+
|> _.WithCommon(DotNetCli.setVersion))
201+
integrationTestsProjectPath
184202

185203
let unitTestsProjectPath =
186204
"tests"

0 commit comments

Comments
 (0)