Prerequisites:
- The Klocwork Server package must be installed.
- The Klocwork servers must be running.
To test your Klocwork installation, you can use the sample project 'demosthenes' to quickly create and analyze a project. To set up the sample project:
-
In the <klocwork_server_install>/samples directory, you can find the Demosthenes project, which is a C/C++ sample project.
-
From <klocwork_server_install>/samples/demosthenes, run [<environment_variable_settings>] kwrun.sh [<output directory>]. If you are using an Ubuntu machine that uses the Dash shell, run: [<environment_variable_settings>] /bin/bash ./kwrun.sh [<output directory>]
where <environment_variable settings> can include:
-
KW_LICENSE_HOST=<host>
- specifies the License Server host (if you are not using a license file)
-
KW_LICENSE_PORT=<port> - specifies the License Server port (if you are not using a license file, and if the License Server is running on a non- default port. The default is 27000.)
-
KW_NO_KWINJECT=[yes|y] - generate build specification without kwinject
<output_directory> is the directory where all analysis data is stored. The default output directory is demosthenes_build, in the current working directory. kwrun.sh creates a demosthenes project on the server and analyzes each revision of the source code.
-
In your browser, enter the following URL: http://<klocwork_server_host>:<klocwork_server_port>.
-
Select Klocwork Static Code Analysis and log in. A password is not required if you have not set up authentication.
- Choose demosthenes from the project list. From the issues list, you can investigate the issues and get familiar with all of the available features found in Klocwork Static Code Analysis.