Running your next integration build analysis

Running incremental analysis

Once you've run an initial full integration build analysis, you can run incremental analysis for subsequent builds. We recommend using incremental analysis with each incremental build of your source files.

Running kwbuildproject with the --incremental option analyzes only files changed since the last analysis, as well as any files with dependencies on the changed files. This can reduce analysis time significantly, especially for large projects.

Important: To run incremental analysis, you must retain the output tables directory after the analysis run.

  1. Update your build specification:

    If you used kwinject to create your build specification, run the command again:

    kwinject <my_build_command>
    

    By default, kwinject updates any lines that need to be changed, adds new lines and removes any "dead" compile lines that were based on source files that have been removed.

    If you didn't use kwinject to create your build specification, recreate the build specification.

  2. Run kwbuildproject with the --incremental option:
    kwbuildproject --url http(s)://server2:8080/my_project --incremental --tables-directory /space/my_tables /home/klocwork/zlib.out
     
  3. Load the analysis results into the database:
    kwadmin --url http://server2:8080/ load my_project /my_tables
     

Running a full build analysis

Whenever you run a clean build (a full rebuild of your source files), you should run a full build analysis.

To run a full build analysis:

  1. Recreate your build specification:
    kwinject —-output /home/klocwork/zlib.out <my_build_command>
    
  2. Use the --force option of kwbuildproject to override incremental analysis:
    kwbuildproject --force --tables-directory /space/my_tables /home/klocwork/zlib.out
     
  3. Load the analysis results into the database:
    kwadmin --url http://server2:8080/ load my_project /space/my_tables