diff --git a/vars/downloadBullseye.groovy b/vars/downloadBullseye.groovy new file mode 100644 index 000000000..121e4066c --- /dev/null +++ b/vars/downloadBullseye.groovy @@ -0,0 +1,14 @@ +// vars/downloadBullseye.groovy + +/** + * downloadBullseye.groovy + * + * Download bullseye. + * + */ +void call() { + echo "[${env.STAGE_NAME}] Downloading bullseye" + String tools_url = "${env.JENKINS_URL}job/daos-stack/job/tools/job/master/lastSuccessfulBuild" + String bullseye_url = "${tools_url}/artifact/bullseyecoverage-linux.tar" + httpRequest url: bullseye_url, httpMode: 'GET', outputFile: 'bullseye.tar' +} diff --git a/vars/functionalTest.groovy b/vars/functionalTest.groovy index 9f2594e91..2a8d364d2 100755 --- a/vars/functionalTest.groovy +++ b/vars/functionalTest.groovy @@ -137,6 +137,10 @@ Map call(Map config = [:]) { error.getMessage()) } + if (env.BULLSEYE) { + downloadBullseye() + } + Map runtestData = [:] if (config.get('test_function', 'runTestFunctional') == 'runTestFunctionalV2') { diff --git a/vars/runTestFunctionalV2.groovy b/vars/runTestFunctionalV2.groovy index 3acfb43bf..d50d441bc 100644 --- a/vars/runTestFunctionalV2.groovy +++ b/vars/runTestFunctionalV2.groovy @@ -88,14 +88,25 @@ Map call(Map config = [:]) { // Restore the ignore failure setting config['ignore_failure'] = ignore_failure - String covfile = 'test.cov' - if (!fileExists('test.cov')) { - covfile += '_not_done' - fileOperations([fileCreateOperation(fileName: covfile, - fileContent: '')]) + if (fileExists("${basedir}bullseye_coverage_logs/test.cov")) { + String name = 'func' + stage_info['pragma_suffix'] + '-cov' + println("[${env.STAGE_NAME}] Stashing ${basedir}bullseye_coverage_logs/test.cov in ${name}") + dir("${basedir}bullseye_coverage_logs") { + stash name: config.get('coverage_stash', name), + includes: 'test.cov' + } + } else { + println("[${env.STAGE_NAME}] No ${basedir}bullseye_coverage_logs/test.cov file found!") } - String name = 'func' + stage_info['pragma_suffix'] + '-cov' - stash name: config.get('coverage_stash', name), - includes: covfile + +// String covfile = 'test.cov' +// if (!fileExists('test.cov')) { +// covfile += '_not_done' +// fileOperations([fileCreateOperation(fileName: covfile, +// fileContent: '')]) +// } +// String name = 'func' + stage_info['pragma_suffix'] + '-cov' +// stash name: config.get('coverage_stash', name), +// includes: covfile return runData } diff --git a/vars/sconsBuild.groovy b/vars/sconsBuild.groovy index 668b10027..216fbff49 100644 --- a/vars/sconsBuild.groovy +++ b/vars/sconsBuild.groovy @@ -123,12 +123,7 @@ Map call(Map config = [:]) { } if (stage_info['compiler'] == 'covc') { - httpRequest url: env.JENKINS_URL + - 'job/daos-stack/job/tools/job/master' + - '/lastSuccessfulBuild/artifact/' + - 'bullseyecoverage-linux.tar', - httpMode: 'GET', - outputFile: 'bullseye.tar' + downloadBullseye() } def set_cwd = '' diff --git a/vars/unitTest.groovy b/vars/unitTest.groovy index a1e6641f2..61947d59a 100755 --- a/vars/unitTest.groovy +++ b/vars/unitTest.groovy @@ -165,12 +165,7 @@ Map call(Map config = [:]) { } if (stage_info['compiler'] == 'covc') { - String tools_url = env.JENKINS_URL + - 'job/daos-stack/job/tools/job/master' + - '/lastSuccessfulBuild/artifact/' - httpRequest url: tools_url + 'bullseyecoverage-linux.tar', - httpMode: 'GET', - outputFile: 'bullseye.tar' + downloadBullseye() } String with_valgrind = stage_info.get('with_valgrind', '')