From dc0453b3a97feb02e66e4888e8d071e8116aa806 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Fri, 8 Feb 2019 12:28:09 +0100 Subject: add test and checkstyle support All tests are in "tests" directory. To run tests use: make test For verbose output use: export V=2;make test ARGS="-V" Test log file is generated in: Testing/Temporary/LastTest.log To run checkstyle for the current commit use: ./scripts/checkstyle.sh To run full check on all files use: ./scripts/checkstyle.sh --full Change-Id: Ic83b3dbd44d2a264d27935f4e65cf9e737cfc0a0 Signed-off-by: Michal Cmarada --- docs/jvpp.rst | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'docs/jvpp.rst') diff --git a/docs/jvpp.rst b/docs/jvpp.rst index fe90f2d..15ab0be 100644 --- a/docs/jvpp.rst +++ b/docs/jvpp.rst @@ -80,12 +80,38 @@ To build the source use make command: make +or for verbose output + +.. code-block:: console + + export V=2; make + You can also install the library (Optional) using (you need to use sudo or have root privileges to install libraries): .. code-block:: console sudo make install +Running the unittests +--------------------- + +You can run unit tests to ensure that JVPP is working correctly. VPP instance needs to be running before the tests are +executed. + +.. code-block:: console + + make test + +or for verbose output + +.. code-block:: console + + export V=2; make test ARGS="-V" + +.. note:: + + The results of tests are stored in temporary log file in ./Testing/Temporary/LastTest.log + Building the packages --------------------- @@ -101,6 +127,30 @@ To build the package you need to call: You can find the packages in build-root/packages folder. +Using Checkstyle +---------------- + +If you are doing changes to source code you can validate checkstyle before pushing the code to mainstream. +To do that you have several options. + +Running checkstyle for last commit (default) + +.. code-block:: console + + ./scripts/checkstyle.sh + +Running checkstyle for all source files + +.. code-block:: console + + ./scripts/checkstyle.sh --full + +Running checkstyle to fix issues automatically + +.. code-block:: console + + ./scripts/checkstyle.sh --fix + Getting JVPP jar ================ -- cgit 1.2.3-korg