Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Stash GCNO files
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 23, 2018
1 parent 92bc824 commit 4774a0f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions ci/Jenkinsfile_utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions ci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4774a0f

Please sign in to comment.