VinTest.Cake.GameTestsTaskBase TContext
VinTest.Cake¶
GameTestsTaskBase<TContext> Class¶
Base Cake task that launches VintageStory, waits for test results, and reports them. Derive from this in your mod's CakeBuild project.
public abstract class GameTestsTaskBase<TContext> : Cake.Frosting.FrostingTask<TContext>
where TContext : VinTest.Cake.ContextBase
Type parameters¶
TContext
Inheritance Object → Cake.Frosting.FrostingTask<TContext> → GameTestsTaskBase<TContext>
Properties¶
GameTestsTaskBase<TContext>.AdditionalLogCapture Property¶
Lines containing these substrings will be printed in the filtered log.
Joined with VinTest.Cake.GameTestsTaskBase<>.DefaultLogCapture: "[VinTest]".
Can be demoted or promoted via LogSuppressions.
Override to customize.
Property Value¶
GameTestsTaskBase<TContext>.AdditionalLogErrors Property¶
Lines containing these substrings will be highlighted in red in the filtered log, and will cause the task to fail, unless IgnoreLogErrors is set, or demoted via LogSuppressions.
Joined with VinTest.Cake.GameTestsTaskBase<>.DefaultLogErrors: "[Error]".
Override to customize.
Property Value¶
GameTestsTaskBase<TContext>.AdditionalLogWarnings Property¶
Lines containing these substrings will be highlighted in yellow in the filtered log.
Joined with VinTest.Cake.GameTestsTaskBase<>.DefaultLogWarnings: "[Warning]", "not found. Hint:".
Can be demoted or promoted via LogSuppressions.
Override to customize.
Property Value¶
GameTestsTaskBase<TContext>.LogSuppressions Property¶
Change level of specific log lines, pattern-matched after primary classification.
Each entry is a (RegexPattern, Level?) pair.
If Level == null - ignore the line entirely (not captured).
If Level != null - override the classified level (e.g. demote Error -> Warning).
Lines that remain/become Error-level after suppression will cause the task to fail.
Override to customize.
protected virtual IEnumerable<(string Pattern,Nullable<Cake.Core.Diagnostics.LogLevel> TargetLevel)> LogSuppressions { protected get; }
Property Value¶
IEnumerable<<String,Nullable<Cake.Core.Diagnostics.LogLevel>>>
Methods¶
GameTestsTaskBase<TContext>.Build(TContext) Method¶
Called during Run(TContext), after Prepare(TContext). Build (or rebuild) whatever is needed before VS is launched.
Default implementation builds AutotestsProjectName (which
should pull in core mod project transitively via ProjectReference in .csproj).
Override to customize.
NOTE: this *OMITS* rebuilding cake orchestrator project: its executable would be locked
and cause MsBuild to fail, since the executable is already driving the build.
This should not be a problem for dotnet run since it rebuilds cake automatically,
but it *WILL* mess things up if you run CakeBuild.exe manually.
Parameters¶
context TContext
GameTestsTaskBase<TContext>.Finally(TContext) Method¶
Performs cleanup after Run(TContext) finishes, even if it fails. Will be called by Cake internals. If you override this, make sure to call the base method first.
Parameters¶
context TContext
GameTestsTaskBase<TContext>.GetAssetsPaths(TContext) Method¶
Absolute paths to asset directories to pass to --addOrigin when launching VS.
Parameters¶
context TContext
Returns¶
GameTestsTaskBase<TContext>.GetModBinaryPaths(TContext) Method¶
Absolute paths to mod directories to pass to --addModPath when launching VS.
Override to customize.
Parameters¶
context TContext
Returns¶
GameTestsTaskBase<TContext>.Prepare(TContext) Method¶
Called during Run(TContext), after generic Cleanup(). Create mod-specific config files here.
Override to customize.
Parameters¶
context TContext
GameTestsTaskBase<TContext>.Run(TContext) Method¶
Entry point for the gametests task, driving the entire process. Cleanup(), Prepare(TContext), Build(TContext), Launch(), Wait(), Print(). Will be called by Cake internals.
Parameters¶
context TContext