From 54eb40660a232cba449a2ab1740c285c1801c6a6 Mon Sep 17 00:00:00 2001 From: David Cumps Date: Tue, 28 Feb 2023 00:59:13 +0100 Subject: [PATCH] Update build.fsx --- build.fsx | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/build.fsx b/build.fsx index df7db44..2f61533 100644 --- a/build.fsx +++ b/build.fsx @@ -45,7 +45,6 @@ let versionSuffix = // Configuration values for tests let testNetFrameworkVersion = "net48" -let testNetCoreVersion = "net7.0" let testNetVersion = "net7.0" printfn "Assembly version: %s\nNuget version; %s\n" releaseNotes.AssemblyVersion releaseNotes.NugetVersion @@ -115,22 +114,6 @@ Target "Build" (fun _ -> // Run tests //-------------------------------------------------------------------------------- -type Runtime = - | NetCore - | Net - | NetFramework - -let getTestAssembly runtime project = - let assemblyPath = match runtime with - | NetCore -> !! ("src" @@ "**" @@ "bin" @@ "Release" @@ testNetCoreVersion @@ fileNameWithoutExt project + ".dll") - | NetFramework -> !! ("src" @@ "**" @@ "bin" @@ "Release" @@ testNetFrameworkVersion @@ fileNameWithoutExt project + ".dll") - | Net -> !! ("src" @@ "**" @@ "bin" @@ "Release" @@ testNetVersion @@ fileNameWithoutExt project + ".dll") - - if Seq.isEmpty assemblyPath then - None - else - Some (assemblyPath |> Seq.head) - module internal ResultHandling = let (|OK|Failure|) = function | 0 -> OK @@ -171,7 +154,7 @@ Target "RunTests" <| fun _ -> CreateDir outputTests projects |> Seq.iter (runSingleProject) -Target "RunTestsNetCore" <| fun _ -> +Target "RunTestsNet" <| fun _ -> let projects = match (isWindows) with | true -> !! "./src/**/*.Tests.*sproj" @@ -181,7 +164,7 @@ Target "RunTestsNetCore" <| fun _ -> let runSingleProject project = let arguments = - (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputTests) + (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetVersion outputTests) let result = ExecProcess(fun info -> info.FileName <- "dotnet" @@ -364,7 +347,7 @@ Target "Nuget" DoNothing // test dependencies "Build" ==> "RunTests" -"Build" ==> "RunTestsNetCore" +"Build" ==> "RunTestsNet" // nuget dependencies "BuildRelease" ==> "CreateNuget" @@ -372,7 +355,7 @@ Target "Nuget" DoNothing "BuildRelease" ==> "All" "RunTests" ==> "All" -"RunTestsNetCore" ==> "All" +"RunTestsNet" ==> "All" "Nuget" ==> "All" RunTargetOrDefault "Help"