Skip to content
dosluke edited this page Mar 5, 2016 · 7 revisions

Test Runner

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

Configuration Options

To configure the TestRunner, open Cosmos.TestRunner.Core.DefaultEngineConfiguration.cs, found inside the Tests/TestRunner folder in the Cosmos solution.

Time Out

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.

Adding a Kernel

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.

Clone this wiki locally