Skip to content

Commit

Permalink
Disable test coverage of C++ codebase on CI (apache#15981)
Browse files Browse the repository at this point in the history
* disable test coverage on ci

* address the comment

* retrigger CI
  • Loading branch information
stu1130 authored and zixuanweeei committed Sep 2, 2019
1 parent 1a4cc18 commit 9b505bf
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 81 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ if(USE_TENSORRT)
${ONNX_PROTO_LIBRARY} ${ONNX_LIBRARY} ${PROTOBUF_LIBRARY})
endif()

# please note that when you enable this, you might run into an linker not being able to work properly due to large code injection.
# you can find more information here https://github.com/apache/incubator-mxnet/issues/15971
if(ENABLE_TESTCOVERAGE)
message(STATUS "Compiling with test coverage support enabled. This will result in additional files being written to your source directory!")
find_program( GCOV_PATH gcov )
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ endif
CFLAGS += -I$(TPARTYDIR)/mshadow/ -I$(TPARTYDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -I$(TPARTYDIR)/tvm/include -Iinclude $(MSHADOW_CFLAGS)
LDFLAGS = -pthread -ldl $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS)

# please note that when you enable this, you might run into an linker not being able to work properly due to large code injection.
# you can find more information here https://github.com/apache/incubator-mxnet/issues/15971
ifeq ($(ENABLE_TESTCOVERAGE), 1)
CFLAGS += --coverage
LDFLAGS += --coverage
Expand Down
27 changes: 2 additions & 25 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ build_centos7_cpu() {
make \
DEV=1 \
USE_LAPACK=1 \
ENABLE_TESTCOVERAGE=1 \
USE_LAPACK_PATH=/usr/lib64/liblapack.so \
USE_BLAS=openblas \
USE_MKLDNN=0 \
Expand All @@ -314,7 +313,6 @@ build_amzn_linux_cpu() {
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DENABLE_TESTCOVERAGE=ON \
-DUSE_CUDA=OFF\
-DUSE_OPENCV=ON\
-DUSE_OPENMP=ON\
Expand All @@ -335,7 +333,6 @@ build_centos7_mkldnn() {
build_ccache_wrappers
make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_LAPACK=1 \
USE_LAPACK_PATH=/usr/lib64/liblapack.so \
USE_BLAS=openblas \
Expand All @@ -350,7 +347,6 @@ build_centos7_gpu() {
build_ccache_wrappers
make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_LAPACK=1 \
USE_LAPACK_PATH=/usr/lib64/liblapack.so \
USE_BLAS=openblas \
Expand All @@ -374,7 +370,6 @@ build_ubuntu_cpu_openblas() {
build_ccache_wrappers
make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_MKLDNN=0 \
Expand All @@ -392,7 +387,6 @@ build_ubuntu_cpu_mkl() {
export CXX="ccache g++"
make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=mkl \
USE_MKLDNN=0 \
Expand All @@ -410,7 +404,6 @@ build_ubuntu_cpu_cmake_debug() {
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DENABLE_TESTCOVERAGE=ON \
-DUSE_CUDA=OFF \
-DUSE_MKL_IF_AVAILABLE=OFF \
-DUSE_OPENMP=OFF \
Expand Down Expand Up @@ -461,7 +454,6 @@ build_ubuntu_cpu_clang39() {
export CC=clang-3.9
build_ccache_wrappers
make \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_MKLDNN=0 \
Expand All @@ -479,7 +471,6 @@ build_ubuntu_cpu_clang60() {
build_ccache_wrappers

make \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_MKLDNN=0 \
Expand Down Expand Up @@ -525,7 +516,6 @@ build_ubuntu_cpu_clang39_mkldnn() {
build_ccache_wrappers

make \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_OPENMP=0 \
Expand All @@ -542,7 +532,6 @@ build_ubuntu_cpu_clang60_mkldnn() {
build_ccache_wrappers

make \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_OPENMP=1 \
Expand All @@ -557,7 +546,6 @@ build_ubuntu_cpu_mkldnn() {

make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_SIGNAL_HANDLER=1 \
Expand All @@ -571,7 +559,6 @@ build_ubuntu_cpu_mkldnn_mkl() {

make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=mkl \
USE_SIGNAL_HANDLER=1 \
Expand Down Expand Up @@ -635,7 +622,6 @@ build_ubuntu_gpu_tensorrt() {
-DUSE_OPENMP=0 \
-DUSE_MKLDNN=0 \
-DUSE_MKL_IF_AVAILABLE=OFF \
-DENABLE_TESTCOVERAGE=ON \
-DCUDA_ARCH_NAME=Manual \
-DCUDA_ARCH_BIN=$CI_CMAKE_CUDA_ARCH_BIN \
-G Ninja \
Expand All @@ -651,7 +637,6 @@ build_ubuntu_gpu_mkldnn() {

make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_CUDA=1 \
Expand All @@ -669,7 +654,6 @@ build_ubuntu_gpu_mkldnn_nocudnn() {

make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_BLAS=openblas \
USE_CUDA=1 \
USE_CUDA_PATH=/usr/local/cuda \
Expand All @@ -684,7 +668,6 @@ build_ubuntu_gpu_cuda101_cudnn7() {
build_ccache_wrappers
make \
DEV=1 \
ENABLE_TESTCOVERAGE=1 \
USE_BLAS=openblas \
USE_MKLDNN=0 \
USE_CUDA=1 \
Expand All @@ -706,8 +689,7 @@ build_ubuntu_amalgamation() {
build_ccache_wrappers
make -C amalgamation/ clean
make -C amalgamation/ \
USE_BLAS=openblas \
ENABLE_TESTCOVERAGE=1
USE_BLAS=openblas
}

build_ubuntu_amalgamation_min() {
Expand All @@ -717,8 +699,7 @@ build_ubuntu_amalgamation_min() {
make -C amalgamation/ clean
make -C amalgamation/ \
USE_BLAS=openblas \
MIN=1 \
ENABLE_TESTCOVERAGE=1
MIN=1
}

build_ubuntu_gpu_cmake_mkldnn() {
Expand All @@ -730,7 +711,6 @@ build_ubuntu_gpu_cmake_mkldnn() {
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DUSE_SIGNAL_HANDLER=ON \
-DENABLE_TESTCOVERAGE=ON \
-DUSE_CUDA=1 \
-DUSE_CUDNN=1 \
-DUSE_MKLML_MKL=1 \
Expand All @@ -755,7 +735,6 @@ build_ubuntu_gpu_cmake() {
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DUSE_SIGNAL_HANDLER=ON \
-DENABLE_TESTCOVERAGE=ON \
-DUSE_CUDA=ON \
-DUSE_CUDNN=ON \
-DUSE_MKL_IF_AVAILABLE=OFF \
Expand All @@ -781,7 +760,6 @@ build_ubuntu_cpu_large_tensor() {
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DUSE_SIGNAL_HANDLER=ON \
-DENABLE_TESTCOVERAGE=ON \
-DUSE_CUDA=OFF \
-DUSE_CUDNN=OFF \
-DUSE_MKLDNN=OFF \
Expand All @@ -802,7 +780,6 @@ build_ubuntu_gpu_large_tensor() {
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DUSE_SIGNAL_HANDLER=ON \
-DENABLE_TESTCOVERAGE=ON \
-DUSE_CUDA=ON \
-DUSE_CUDNN=ON \
-DUSE_MKL_IF_AVAILABLE=OFF \
Expand Down
Loading

0 comments on commit 9b505bf

Please sign in to comment.