Created
November 16, 2022 16:01
-
-
Save SteveGilham/ffab967daa1402440a562c771c73a5eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// do any required customizations here | |
var altcoverSettings = new AltCover.Cake.CoverageSettings { | |
PreparationPhase = new TestPrepareOptions(), | |
CollectionPhase = new TestCollectOptions(), | |
Options = new TestOptions() | |
}; | |
var testSettings = new DotNetCoreTestSettings { | |
Configuration = configuration, | |
NoBuild = true, | |
}; | |
// It should just be like this to mix-in the AltCover coverage settings explicitly | |
// testSettings.ArgumentCustomization = altcoverSettings.Concatenate(testSettings.ArgumentCustomization); | |
// SDK v7.0.100 needs this instead | |
var args = AltCover.DotNet.ToTestArgumentList( | |
altcoverSettings.PreparationPhase, | |
altcoverSettings.CollectionPhase, | |
altcoverSettings.Options).ToArray(); | |
Array.ForEach(args, | |
s => { var bits = s.Substring(3).Split('=', StringSplitOptions.RemoveEmptyEntries); | |
testSettings.EnvironmentVariables[bits[0]] = bits[1].Trim('"');}); | |
// test using the default alias | |
DotNetTest("./_DotnetTest/cake_dotnettest.fsproj", testSettings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment