mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-08-09 06:39:12 +00:00
Enable the code coverage on the whole llvm-toolchain
This commit is contained in:
parent
d81438ec64
commit
3dbb24b904
3
debian/control
vendored
3
debian/control
vendored
@ -8,7 +8,8 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl8.5, expect,
|
|||||||
sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9),
|
sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9),
|
||||||
lsb-release, patchutils, diffstat, xz-utils, chrpath, python-dev,
|
lsb-release, patchutils, diffstat, xz-utils, chrpath, python-dev,
|
||||||
libedit-dev, swig, python-sphinx, ocaml-nox, binutils-dev, libcloog-isl-dev,
|
libedit-dev, swig, python-sphinx, ocaml-nox, binutils-dev, libcloog-isl-dev,
|
||||||
libisl-dev (>= 0.11.1), binutils-gold [amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32]
|
libisl-dev (>= 0.11.1), binutils-gold [amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32],
|
||||||
|
${dep:codecoverage}
|
||||||
Build-Conflicts: oprofile, ocaml
|
Build-Conflicts: oprofile, ocaml
|
||||||
Standards-Version: 3.9.3
|
Standards-Version: 3.9.3
|
||||||
Homepage: http://www.llvm.org/
|
Homepage: http://www.llvm.org/
|
||||||
|
32
debian/rules
vendored
32
debian/rules
vendored
@ -62,6 +62,14 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS)))
|
||||||
|
# enable the code coverage
|
||||||
|
CODECOVERAGE=yes
|
||||||
|
CXXFLAGS_EXTRA="-fprofile-arcs -ftest-coverage"
|
||||||
|
LDFLAGS_EXTRA="-coverage -lgcov"
|
||||||
|
control_vars = "$(control_vars) -Vdep:codecoverage=lcov"
|
||||||
|
endif
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
# --buildsystem=cmake --builddirectory=$(TARGET_BUILD)
|
# --buildsystem=cmake --builddirectory=$(TARGET_BUILD)
|
||||||
@ -94,6 +102,14 @@ override_dh_auto_configure: debian/lldb-$(LLVM_VERSION).install debian/lldb-$(LL
|
|||||||
ln -s ../polly .; \
|
ln -s ../polly .; \
|
||||||
|
|
||||||
|
|
||||||
|
# cd clang/tools/ && \
|
||||||
|
# if test -h extra; then \
|
||||||
|
# rm extra; \
|
||||||
|
# fi; \
|
||||||
|
# ln -s ../../clang-extra extra; \
|
||||||
|
# readlink extra
|
||||||
|
|
||||||
|
|
||||||
cd projects/ && \
|
cd projects/ && \
|
||||||
if test -h compiler-rt; then \
|
if test -h compiler-rt; then \
|
||||||
rm compiler-rt; \
|
rm compiler-rt; \
|
||||||
@ -124,7 +140,7 @@ override_dh_auto_configure: debian/lldb-$(LLVM_VERSION).install debian/lldb-$(LL
|
|||||||
|
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
$(MAKE) $(NJOBS) -C $(TARGET_BUILD) VERBOSE=1 CLANG_VENDOR=$(VENDOR) CXXFLAGS=-std=c++0x REQUIRES_RTTI=1
|
$(MAKE) $(NJOBS) -C $(TARGET_BUILD) VERBOSE=1 CLANG_VENDOR=$(VENDOR) CXXFLAGS="$(CXXFLAGS_EXTRA) -std=c++0x" LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1
|
||||||
cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
|
cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
|
||||||
# $(MAKE) $(NJOBS) -C build-compiler-rt VERBOSE=1
|
# $(MAKE) $(NJOBS) -C build-compiler-rt VERBOSE=1
|
||||||
# Only available in clang 3.3
|
# Only available in clang 3.3
|
||||||
@ -191,7 +207,21 @@ override_dh_shlibdeps:
|
|||||||
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/ dh_shlibdeps
|
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/ dh_shlibdeps
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
|
# LLVM tests
|
||||||
$(MAKE) -C $(TARGET_BUILD) check || true
|
$(MAKE) -C $(TARGET_BUILD) check || true
|
||||||
|
# clang tests
|
||||||
|
cd build-llvm/ && $(MAKE) -C tools/clang/ test || true
|
||||||
|
# lldb tests
|
||||||
|
cd build-llvm/Release/lib/python2.7/site-packages/lldb && if test ! -h _lldb.so -o -f _lldb.so; then ln -s ../../../liblldb.so _lldb.so; fi
|
||||||
|
cd build-llvm/ && $(MAKE) -C tools/lldb/test
|
||||||
|
# polly tests
|
||||||
|
cd build-llvm/ && $(MAKE) polly-test -C tools/polly/test/
|
||||||
|
|
||||||
|
if test "$(CODECOVERAGE)" = "yes"; then \
|
||||||
|
mkdir -p reports/; \
|
||||||
|
lcov --directory build-llvm/ --capture --ignore-errors source --output-file reports/scilab-code-coverage.info; \
|
||||||
|
genhtml -o reports/coverage --show-details --highlight --legend reports/scilab-code-coverage.info; \
|
||||||
|
fi
|
||||||
|
|
||||||
override_dh_gencontrol:
|
override_dh_gencontrol:
|
||||||
dh_gencontrol -- $(control_vars)
|
dh_gencontrol -- $(control_vars)
|
||||||
|
Loading…
Reference in New Issue
Block a user