Krita builds for Coverity Scans (notes)
Open, Needs TriagePublic

Description

This task is just a place for notes for those who wish to upload Krita build to Coverity.

TL;DR It requires a lot of space, around 5GB, you'll have to upload a ~2GB file (can take a long time depending on the connection), and the analysis takes 30-60min. But first you'd need to build Krita from scratch which can also take time.

  1. Detailed instruction are here: https://scan.coverity.com/download?tab=cxx.
  2. You need to clean up your build directory or use make clean, otherwise the directory won't contain any information. (More precisely, all files must be compiled by cov-build; I believe you could keep cov-build and just always use it to build Krita and the cov-int directory will be always up to date, then).
    • make clean
    • cmake ../krita -DCMAKE_INSTALL_PREFIX=$DIR/install -DCMAKE_BUILD_TYPE=Debug -DKRITA_DEVS=ON -DHIDE_SAFE_ASSERTS=off -DPYTHON_EXECUTABLE=/usr/bin/python3 -DFETCH_TRANSLATIONS=ON
    • you can stop and start cov-build multiple times, it works just like standard building
      • the only exception is that if you run it to the end twice, then it will complain "no files were emitted!" but it's easy to fix: just do touch plugins/impex/gif/gif_import.cpp (to compile anything), and then run it, and it will miraculously see all the files again.
  3. The cov-int directory will have around 2.8GB.
  4. The zip file you create using command zip -r krita.zip cov-int will be around 2GB.
    • in the future, it would be good to explore higher level of compression (use lzma or zip on the highest level, it will take some time but maybe less internet at least)
    • command: XZ_OPT=-9 tar -Jcvf krita.xz cov-int results in a 1.7GB file (~84% of size of the zip file above) - but it takes much longer time to complete (might not be worth it)
  5. Compressing will not take much time.
  6. Sending it over the internet can take a long time (look at the button, it should say Working...). For 2.9MiB/s connection, it takes around 10 minutes. (It's 2GB of content after all!)
  7. Analysis can take a long time, but should be ready after an hour.
  8. Don't worry about a "queue", a 5 builds queue means it will start in a moment (I haven't seen a longer one yet).
tymond created this task.Feb 28 2022, 8:22 PM
tymond updated the task description. (Show Details)Feb 28 2022, 10:52 PM
tymond updated the task description. (Show Details)Feb 28 2022, 10:57 PM
tymond updated the task description. (Show Details)
tymond updated the task description. (Show Details)Mar 1 2022, 2:04 PM
tymond updated the task description. (Show Details)
tymond updated the task description. (Show Details)
tymond updated the task description. (Show Details)Mar 29 2022, 1:35 AM