-
Notifications
You must be signed in to change notification settings - Fork 573
TestRunner
The test runner is used for testing kernels in Cosmos, it is used primarily as an "Auto-Tester". The TestRunner can test multiple kernels and will report all failures after testing is done. The configuration for the TestRunner is found inside Cosmos.TestRunner.Core.DefaultEngineConfiguration
To configure the TestRunner, open Cosmos.TestRunner.Core.DefaultEngineConfiguration.cs, found inside the Tests/TestRunner folder in the Cosmos solution.
To set the period before the TestRunner registers an error, change the line: engine.AllowedSecondsInKernel = 1800; This means that, in this case, if the Kernel runs for more that 30 minutes then it will register a failure.
To add a kernel to the TestRunner, open the config file and add line below engine.EnableStackCorruptionChecks = false;
engine.AddKernel(typeof(MyKernelHere).Assembly.Location);
like this line:
engine.AddKernel(typeof(Cosmos.Kernel.Tests.Fat.Kernel).Assembly.Location);
#Running
After freshly installing the devkit, Visual Studio should open.
Install the Bochs x86 emulator from sourceforge, google it.
In the solution, go to Tests > TestRunner > Cosmos.TestRunner > Program.cs
To the left of the start button, make sure Cosmos.TestRunner is selected, also make sure you are using the x86 config.
Then you can run! :) Several windows will open, because it is testing multiple kernels.
At the end it will ask if you want to save the results, you don't need to unless you really want to trace stuff.