![]() ![]() The following list shows some best practices: Make check - qtest Writing portable test cases īoth unit tests and qtests can run on POSIX hosts as well as Windows hosts.Ĭare must be taken when writing portable test cases that can be built and run Is in tests/unit/foo-test.c, it is enough to add an entry like: The values are any additional sources andĭependencies to be linked with the test. The unit tests are listed in aĭictionary called tests. The test code should be organized with the glib testing framework.Ĭopying and modifying an existing test is usually a good idea.Īdd the test to tests/unit/meson.build. The module API, then verify the interface behaves as expected from your Normally you would include the header file which exports ![]() If you are writing new code in QEMU, consider adding a unit test, especiallyįor utility modules that are relatively stateless or have few dependencies. That typically link to individual QEMU object files and exercise them by Unit tests, which can be invoked with make check-unit, are simple C tests Some testsĮxpect the executables to exist and will fail with obscure messages if they Which includes QAPI schema tests, unit tests, QTests and some iotests.ĭifferent sub-types of “make check” tests will be explained below.īefore running tests, it is best to build QEMU programs first.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |