Compare commits

...

2 Commits

Author SHA1 Message Date
Patrick Stevens
eb4dfae8f4 Forbid generics (#55) 2024-06-10 12:18:33 +01:00
Patrick Stevens
78f51d127c Print path to TRX file (#54) 2024-06-10 12:16:16 +01:00
2 changed files with 22 additions and 0 deletions

View File

@@ -230,6 +230,27 @@ module TestFixture =
(test : SingleTestMethod)
: (Result<TestMemberSuccess, TestMemberFailure> * IndividualTestRunMetadata) list
=
if test.Method.ContainsGenericParameters then
let failureMetadata =
{
Total = TimeSpan.Zero
Start = DateTimeOffset.Now
End = DateTimeOffset.Now
ComputerName = Environment.MachineName
ExecutionId = Guid.NewGuid ()
TestId = Guid.NewGuid ()
TestName = test.Name
ClassName = test.Method.DeclaringType.FullName
StdErr = None
StdOut = None
}
let error =
TestMemberFailure.Malformed [ "Test contained generic parameters; generics are not supported." ]
(Error error, failureMetadata) |> List.singleton
else
let resultPreRun =
(None, test.Modifiers)
||> List.fold (fun _result modifier ->

View File

@@ -401,6 +401,7 @@ module Program =
let contents = TrxReport.toXml report |> fun d -> d.OuterXml
trxPath.Directory.Create ()
File.WriteAllText (trxPath.FullName, contents)
Console.Error.WriteLine $"Written TRX file: %s{trxPath.FullName}"
| None -> ()
match outcome with