diff --git a/ci/Jenkinsfile_utils.groovy b/ci/Jenkinsfile_utils.groovy index 818eb62f7152..6c5cd7d98247 100644 --- a/ci/Jenkinsfile_utils.groovy +++ b/ci/Jenkinsfile_utils.groovy @@ -57,22 +57,32 @@ def init_git_win() { } // pack libraries for later use -def pack_lib(name, libs) { +def pack_lib(name, libs, include_gcov_data = false) { sh """ echo "Packing ${libs} into ${name}" echo ${libs} | sed -e 's/,/ /g' | xargs md5sum """ stash includes: libs, name: name + + if (include_gcov_data) { + // Store GCNO files that are required for GCOV to operate during runtime + sh "find . -name '*.gcno'" + stash name: "${name}_gcov_data", includes: "**.gcno" + } } // unpack libraries saved before -def unpack_and_init(name, libs) { +def unpack_and_init(name, libs, include_gcov_data = false) { init_git() unstash name sh """ echo "Unpacked ${libs} from ${name}" echo ${libs} | sed -e 's/,/ /g' | xargs md5sum """ + if (include_gcov_data) { + // Restore GCNO files that are required for GCOV to operate during runtime + unstash "${name}_gcov_data" + } } def publish_test_coverage() { diff --git a/ci/build.py b/ci/build.py index 8877982078c3..d87a81559927 100755 --- a/ci/build.py +++ b/ci/build.py @@ -218,8 +218,8 @@ def container_run(platform: str, # Environment setup # environment = { - 'GCOV_PREFIX': '/work/mxnet', # GCOV report directory - 'GCOV_PREFIX_STRIP': '3', + # 'GCOV_PREFIX': '/work/mxnet/gcov_coverage', # GCOV report directory + # 'GCOV_PREFIX_STRIP': '2', 'CCACHE_MAXSIZE': '500G', 'CCACHE_TEMPDIR': '/tmp/ccache', # temp dir should be local and not shared 'CCACHE_DIR': '/work/ccache', # this path is inside the container as /work/ccache is