Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following page describes examples of Coverity commands:

...

  • You must stop all Gradle daemon processes and use --no-daemon in order for the cov-build to work properly, refer to Coverity GradleCoverity Gradle Daemon Daemon
  • If cov-build logs "Emitted 0 Java compilation united (0%) successfully and in the build-log.txt you see "--sourcepath assigned the value '--bootclasspath' leaving --bootclasspath unspecified" , refer to Sourcepath Assigned Leaving Bootclasspath Unspecified
    • You can create an init.gradle file with the following contents 

      No Format
      allprojects {
              tasks.withType(JavaCompile) {
                      if (project.hasProperty("forCoverity")) {
                              options.sourcepath = files('/this/directory/must/not/exists')
                      }
              }
      }
      
      


    • and add this to the end of the cov-build command

      No Format
      --init-script init.gradle -PforCoverity


Delta analysis

cov-run-desktop --dir ${WORKSPACE}/idir  --host ${COVERITY_HOST} --stream ${COV_STREAM} ${CHANGE_SET}

Command Variables

VariableDescription
Jenkins environment variablesrefer to Jenkins Set Environment Variables
COVERITY_HOSTThe Coverity server host name configured in the global configuration
COVERITY_PORTThe Coverity server port configured in the global configuration
COV_STREAMThe Coverity stream configured in the Job configuration.
CHANGE_SETThe files that have changed since the last build.

...