Skip to content

Commit

Permalink
Separate rather than comment out this action
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Nov 25, 2021
1 parent b8d09b6 commit c4ae555
Showing 1 changed file with 34 additions and 6 deletions.
40 changes: 34 additions & 6 deletions Build/targets.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ let lastGoodPackage () =

lastGoodPackage ()


let consoleBefore =
(Console.ForegroundColor, Console.BackgroundColor)

Expand Down Expand Up @@ -307,7 +306,7 @@ let cliTaggedArguments tag =
DistributedLoggers = None
Properties =
[ "AltCoverTag", (tag + "_") ]
DisableInternalBinLog = true }
DisableInternalBinLog = true }

let withWorkingDirectoryVM dir o =
{ dotnetOptions o with
Expand Down Expand Up @@ -881,6 +880,32 @@ _Target
//"./_Mono/Sample31/Sample31.dll"
"./_Mono/Sample3/Sample3.dll" ])

_Target
"BuildSample31"
(fun _ ->
let mcs =
"_Binaries/MCS/Release+AnyCPU/net472/MCS.exe"

[
("./_Mono/Sample31",
[ "-target:library"
"-debug"
"-D:MONO"
"-out:./_Mono/Sample31/Sample31.dll"
"-lib:./packages/Mono.Cecil.0.11.4/lib/net40"
"-r:Mono.Cecil.dll"
"./Samples/Sample31/Class1.cs" ]) ]
|> Seq.iter
(fun (dir, cmd) ->
Directory.ensure dir

("Mono compilation of '"
+ String.Join(" ", cmd)
+ "' failed")
|> Actions.Run(mcs, ".", cmd))

Actions.FixMVId [ "./_Mono/Sample31/Sample31.dll" ])

// Code Analysis

_Target "Analysis" ignore
Expand Down Expand Up @@ -1343,7 +1368,7 @@ _Target
Path.getFullName "_Binaries/AltCover.Recorder.Tests/Debug+AnyCPU/net20/AltCover.Recorder.Tests.dll"
]
Actions.Run(nunitConsole, ".", rec2Args) "Recorder NUnit failed"

with
| x ->
printfn "%A" x
Expand Down Expand Up @@ -1654,7 +1679,6 @@ _Target
// https://github.com/SteveGilham/altcover/commit/3b8d20b546a719b5f57dcd55976a667dfac5349b#diff-30d5a45f470e8be0a3a8dc6a59e6c49156c055230b965a3a8a606a4104548c44
// could it be collectorised??


_Target
"UnitTestWithAltCover"
(fun _ ->
Expand Down Expand Up @@ -1814,7 +1838,7 @@ _Target
Path.getFullName "_Binaries/AltCover.Recorder.Tests/Debug+AnyCPU/net20/__RecorderTestWithAltCover/AltCover.Recorder.Tests.dll"
]
Actions.Run(nunitConsole, ".", recArgs) "Recorder net20 NUnit failed"

printfn "Instrument the net472 Recorder tests"

let Recorder472Dir =
Expand Down Expand Up @@ -2562,7 +2586,7 @@ _Target

let methods = coverageDocument.Descendants(XName.Get("Method"))
|> Seq.toList

Assert.That(methods |> Seq.length, Is.EqualTo methodcount, "method count wrong")

methods
Expand Down Expand Up @@ -6816,6 +6840,10 @@ Target.activateFinal "ResetConsoleColours"
==> "BuildMonoSamples"
==> "Compilation"

// My machine only
"BuildMonoSamples"
==> "BuildSample31"

"BuildDebug" ==> "Lint" ==> "Analysis"

"Compilation" ?=> "Analysis"
Expand Down

0 comments on commit c4ae555

Please sign in to comment.