1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2018-2019 Intel Corporation.
4 Running DPDK Unit Tests with Meson
5 ==================================
7 This section describes how to run test cases with the DPDK meson build system.
9 Steps to build and install DPDK using meson can be referred
10 in :doc:`build-sdk-meson`
12 Grouping of test cases
13 ----------------------
15 Test cases have been classified into four different groups.
20 * Tests which produce lists of objects as output, and therefore that need
23 These tests can be run using the argument to ``meson test`` as
24 ``--suite project_name:label``.
28 $ meson test -C <build path> --suite DPDK:fast-tests
30 If the ``<build path>`` is current working directory,
31 the ``-C <build path>`` option can be skipped as below::
33 $ meson test --suite DPDK:fast-tests
35 The project name is optional so the following is equivalent to the previous
38 $ meson test --suite fast-tests
40 The meson command to list all available tests::
44 Test cases are run serially by default for better stability.
46 Arguments of ``test()`` that can be provided in meson.build are as below:
48 * ``is_parallel`` is used to run test case either in parallel or non-parallel mode.
49 * ``timeout`` is used to specify the timeout of test case.
50 * ``args`` is used to specify test specific parameters.
51 * ``env`` is used to specify test specific environment parameters.
54 Dealing with skipped test cases
55 -------------------------------
57 Some unit test cases have a dependency on external libraries, driver modules
58 or config flags, without which the test cases cannot be run. Such test cases
59 will be reported as skipped if they cannot run. To enable those test cases,
60 the user should ensure the required dependencies are met.
61 Below are a few possible causes why tests may be skipped:
63 #. Optional external libraries are not found.
64 #. Config flags for the dependent library are not enabled.
65 #. Dependent driver modules are not installed on the system.
66 #. Not enough processing cores. Some tests are skipped on machines with 2 or 4 cores.