-
Notifications
You must be signed in to change notification settings - Fork 9
Documentation updates for IncludeOS v0.15.0 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
9d7fe0f
cfd7044
cecd854
c4da25b
e5ba6ba
62256d4
fc27861
cf670d5
42d9ecd
9efd858
194cdaf
aae902a
e547000
0bd3ffb
2eaec31
03613a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. _Testing : | ||
|
||
Testing IncludeOS | ||
================= | ||
|
||
To test IncludeOS as a kernel and it's features, we have written a number of tests | ||
that can be reused by anyone to test there work on IncludeOS. You will find a list | ||
staiyeba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
of our tests in the `IncludeOS/test <https://github.com/includeos/IncludeOS/tree/master/test>`__ folder. | ||
|
||
.. note:: The following testing instructions only work on Linux at the moment. | ||
|
||
Unit Tests | ||
~~~~~~~~~~ | ||
|
||
All the tests are grouped by categories as listed in the folder. The unit tests for each of the categories of tests are located under ``IncludeOS/test/<category>/unit/<test-name>.cpp``. | ||
|
||
To run all the unit tests simultaneously do: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not actually run the tests. Only installs them. Ready for cmake. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See here how they are actually run (before we started doing coverage at the same time) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separated this into two sections as follows:
We can remove the section on coverage if it's not something we are concentrating on yet. |
||
|
||
:: | ||
|
||
$ conan install IncludeOS/test -pr gcc-7.3.0-linux-x86_64 -s build_type=Debug | ||
$ . ./activate.sh | ||
|
||
If you want to get the coverage report for the unit tests as well do: | ||
|
||
:: | ||
|
||
# cmake coverage | ||
$ . ./activate.sh && cmake -DCOVERAGE=ON -DCODECOV_HTMLOUTPUTDIR=<your-coverage-dir> IncludeOS/test | ||
# make coverage | ||
$ . ./activate.sh && make -j nproc coverage | ||
|
||
After running the test, you can then view the coverage report in html format | ||
in the path you specified. | ||
|
||
Integration Testing | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
To do integration testing you will need to have all the necessary tools installed. | ||
We use our `puppet file <https://github.com/includeos/includeos-tools/blob/master/puppet/test_client.pp>`__ to configure our test instances. | ||
You can use the puppet manifest to install on your local machine. | ||
|
||
|
||
To install and build the integration tests: | ||
|
||
:: | ||
|
||
$ conan install test/integration -pr clang-6.0-linux-x86_64 | ||
$ . ./activate.sh | ||
$ cmake $SRC/test/integration -DSTRESS=ON -DCMAKE_BUILD_TYPE=Debug | ||
$ make -j nproc | ||
|
||
If you would like to build the tests without setting up the network tools, you can use ``-DFOR_PRODUCTION=OFF`` with the ``cmake`` command. This is however not recommended, as keeping the production setting to ON gives proper random. | ||
staiyeba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
We use ``ctest`` to run the integration tests. Along with integration tests we | ||
also have stress tests. To skip the stress tests and run only the integration | ||
tests at random, do: | ||
|
||
:: | ||
|
||
$ ctest -E stress --output-on-failure --schedule-random | ||
|
||
To run only the stress tests and skip all other tests, do: | ||
|
||
:: | ||
|
||
$ ctest -R stress -E integration --output-on-failure | ||
|
||
You can have a look at our `Jenkinsfile <https://github.com/includeos/IncludeOS/blob/master/Jenkinsfile>`__ to get an overview of how we run the tests. You will notice we run our unit tests and coverage with | ||
the gcc profile, currently thats the one we are focusing on. | ||
staiyeba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.. warning:: Remember to run ``. ./deactivate.sh`` to reset your environment to previous state after testing is complete. |
Uh oh!
There was an error while loading. Please reload this page.