URL: https://github.com/freeipa/freeipa/pull/2475 Author: tiran Title: #2475: Add Coverity Scan target Action: opened
PR body: """ Add "make cov-scan" to automate Coverity scan builds. cov-build requires extra quirks to work with recent versions of GCC on Fedora. The make target requires a token and Coverity's build chain. Both are available for privileged project owners on https://scan.coverity.com/projects/freeipa-freeipa . Signed-off-by: Christian Heimes <chei...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/2475/head:pr2475 git checkout pr2475
From 7474aa34d6f894e5a8715f141fe7eb695dc7656b Mon Sep 17 00:00:00 2001 From: Christian Heimes <chei...@redhat.com> Date: Tue, 23 Oct 2018 12:40:40 +0200 Subject: [PATCH] Add Coverity Scan target Add "make cov-scan" to automate Coverity scan builds. cov-build requires extra quirks to work with recent versions of GCC on Fedora. The make target requires a token and Coverity's build chain. Both are available for privileged project owners on https://scan.coverity.com/projects/freeipa-freeipa . Signed-off-by: Christian Heimes <chei...@redhat.com> --- Makefile.am | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile.am b/Makefile.am index 7655e1e7eb..1d23a5075a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,6 +79,8 @@ clean-local: rm -rf "$(top_builddir)/.tox" rm -rf "$(top_srcdir)/__pycache__" rm -f "$(top_builddir)"/$(PACKAGE)-*.tar.gz + rm -rf "$(top_srcdir)/cov-int" + rm -f "$(top_srcdir)/freeipa.tgz" # convenience targets for RPM build .PHONY: rpmroot rpmdistdir version-update _dist-version-bakein _rpms-prep \ @@ -381,6 +383,32 @@ python_install: strip-po: $(MAKE) -C po strip-po +.PHONY: cov-scan +cov-scan: + $(MAKE) clean + @# analyse C code with workaround for missing _Float types + @# https://stackoverflow.com/questions/50434236/coverity-scan-fails-to-build-stdlib-h-with-gnu-source-defined + cov-build --dir cov-int $(MAKE) all \ + CFLAGS="-D_Float32=float -D_Float32x=double -D_Float64=double -D_Float64x='long double' -D_Float128='long double'" + @# remove build directories and analyse Python + rm -rf ipa*/build + cov-build --dir cov-int --no-command \ + $(foreach d,$(PYTHON_SUBDIRS),--fs-capture-search $(d)) + @# analyze JS files + cov-build --dir cov-int --no-command --fs-capture-search install/ui + @# compress and upload + tar czvf freeipa.tgz cov-int + if [ -n "$${COVERITY_SCAN_TOKEN}" ]; then \ + curl --progress-bar --output /dev/null \ + --form token=$${COVERITY_SCAN_TOKEN} \ + --form email=freeipa-devel@lists.fedorahosted.org \ + --form file=@freeipa.tgz \ + --form version="$(VERSION)" \ + --form description="FreeIPA" \ + "https://scan.coverity.com/builds?project=freeipa%2Ffreeipa"; \ + fi + $(MAKE) clean + PYTHON_SHEBANG = \ ipa \ makeaci \
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org