Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
353c5ea
DAOS-17259 test: Adding gcov to daos build
dinghwah May 2, 2025
ae33c25
Update daos_builder.py
dinghwah May 6, 2025
3ad6de2
Update _test_program
dinghwah May 6, 2025
2865862
Update _program
dinghwah May 6, 2025
91a3c5c
Add code_coverage with return kwargs
dinghwah May 6, 2025
8804f4f
Update _static_library
dinghwah May 6, 2025
059b5fd
Update _static_library env
dinghwah May 6, 2025
9111963
Update with isinstenance
dinghwah May 6, 2025
39d92f2
using _known_deps
dinghwah May 6, 2025
5967f00
Restore and test
dinghwah May 6, 2025
e0cfa8c
Update with env
dinghwah May 6, 2025
6f5223b
Update _add_code_coverage
dinghwah May 6, 2025
68fa738
Update _static_library
dinghwah May 6, 2025
6035395
Restore _static_library
dinghwah May 6, 2025
cbf1b14
Update _add_code_coverage with env
dinghwah May 6, 2025
5c8116e
Update _add_code_coverage
dinghwah May 6, 2025
6f9c9fe
Update _add_code_coverage
dinghwah May 6, 2025
8cb0650
Update debug on _add_code_coverage without env
dinghwah May 7, 2025
3b9f680
Update _add_code_coverage with env
dinghwah May 7, 2025
6c75d41
Update _add_code_coverage debug
dinghwah May 7, 2025
5db96ab
Update _add_code_coverage for debug
dinghwah May 7, 2025
018c6d8
Restore _add_code_coverage
dinghwah May 7, 2025
04cf4d2
Update control/SConscript with gcov
dinghwah May 7, 2025
677130b
Update _add_code_coverage debug
dinghwah May 8, 2025
bbc6000
Update _add_code_coverage for debug
dinghwah May 8, 2025
e2519c6
_add_code_coverage debug
dinghwah May 8, 2025
d17eb4e
Update _add_code_coverage debug
dinghwah May 8, 2025
e3900c1
Update _add_code_coverage debug
dinghwah May 8, 2025
d6476c5
Restore _add_code_coverage
dinghwah May 8, 2025
221036a
Update with gcov
dinghwah May 8, 2025
be66f72
Remove env from _add_code_coverage
dinghwah May 8, 2025
cfa6e28
Add debug for _run_command
dinghwah May 8, 2025
f34c46a
Update control/SConscript
dinghwah May 8, 2025
400febb
Add debug _add_code_coverage
dinghwah May 8, 2025
3023435
Update _add_code_coverage after debug
dinghwah May 8, 2025
911338c
Update _program _test_program debug
dinghwah May 8, 2025
d7f6554
Update _program _test_program debug
dinghwah May 8, 2025
31e53b5
Add env to _add_code_coverage
dinghwah May 8, 2025
7ad37d5
Skip gcov for target daos_server_helper
dinghwah May 8, 2025
264e91e
Update control install_go_bin() for debug
dinghwah May 8, 2025
0a5711e
Restore SConscript from src/control
dinghwah May 8, 2025
2aa7ac8
Update CGO_LDFLAGS--coverage -g -O0
dinghwah May 9, 2025
4a3f70c
Update CGO_LDFLAGS to _run_command
dinghwah May 9, 2025
0ff04e4
Update CGO_CFLAGS and code_coverage cleanup.
dinghwah May 9, 2025
9ac3bcc
Update typo -lgcov
dinghwah May 9, 2025
6eb4e0d
Update -fprofile-arcs
dinghwah May 9, 2025
eedae8e
Update with debug
dinghwah May 9, 2025
942aee2
Remove commented env.AppendUnique from _base_setup
dinghwah May 9, 2025
33d272d
Sync with gcov unit-test and files
dinghwah May 12, 2025
7675b14
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah May 16, 2025
5a338d5
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah May 20, 2025
2f374bb
Update with yaml
dinghwah May 20, 2025
ebddc4c
Relocate test gcov env var
dinghwah May 21, 2025
c6b6981
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender May 21, 2025
6a038ab
Merge branch 'dinghwah/DAOS-17259-gtest2' of https://github.com/daos-…
phender May 21, 2025
75247ae
Fix pyyaml import.
phender May 21, 2025
6db2a2e
Add pyyaml install for code coverage
phender May 21, 2025
2ee6a39
Update junit_xml
dinghwah May 21, 2025
66ce01c
Update with python3.11 and debug
dinghwah May 21, 2025
f875d8c
Recommit by adding a debug comment
dinghwah May 27, 2025
7b363fd
Debug with ls lib64
dinghwah May 27, 2025
ff70c93
Comment out the cp
dinghwah May 27, 2025
7b3cd29
Add setup.py and update cp storage_estimator.
dinghwah May 29, 2025
67957a1
Add debug ls -la storage_estimator
dinghwah May 30, 2025
0290704
Update debug cp venv/lib64
dinghwah May 30, 2025
5e4fbff
Update cp libvos_size.so to venv
dinghwah Jun 2, 2025
a6f57ea
Update cp daos_srv/libvos_size.so to daos_srv
dinghwah Jun 2, 2025
779fa37
Update cp -r daos_srv.
dinghwah Jun 2, 2025
90197df
cp libdfs.so to lib64
dinghwah Jun 3, 2025
d56b971
Update to increase timeout
dinghwah Jun 3, 2025
35aead9
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Jun 3, 2025
adeddde
Update Unit Test bdev with memcheck timeout to 360
dinghwah Jun 4, 2025
258e8d9
Empty commit L#857 Jenkinsfile
dinghwah Jun 4, 2025
a3a79f8
Update with ./requirements-code-coverage.txt
dinghwah Jun 4, 2025
7f8314a
Update ARG BASE_DISTRO.
dinghwah Jun 5, 2025
0c2ef8f
Recommit
dinghwah Jun 5, 2025
4a5d6c6
Update Unit Test bdev with memcheck to 480
dinghwah Jun 6, 2025
f94ab79
Update COPY requirements-code-coverage.txt /tmp
dinghwah Jun 6, 2025
33176f6
Add debug pwd
dinghwah Jun 6, 2025
aae47b2
Update with pip install
dinghwah Jun 6, 2025
d217ddc
Update pip install gcovr
dinghwah Jun 6, 2025
dc11a30
Update with COPY .txt to ./
dinghwah Jun 6, 2025
53a986a
Update to skip COPY .txt /tmp/
dinghwah Jun 6, 2025
0675c99
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Jun 6, 2025
51c3683
Update COPY ./requirements-code-coverage.txt ./
dinghwah Jun 7, 2025
6ce3c38
Update Unit Test bdev with memcheck to 720 for debug
dinghwah Jun 7, 2025
af815bd
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Jun 9, 2025
09520be
Updated dockerfile for code coverage report.
phender Jun 9, 2025
3fe290c
Recommit Phil's pr#51 with UT_memcheck
dinghwah Jun 9, 2025
4792f8f
Add WORKDIR before COPY
dinghwah Jun 12, 2025
4ab30ec
Update .dockerignore with requirements-code-coverage.txt
dinghwah Jun 12, 2025
c720932
Make ci/code_coverage_report.sh executable.
phender Jun 13, 2025
830935c
Update with find jsonfiles for gcovr.
dinghwah Jun 13, 2025
f7db2ba
Add double quote for jsonfiles
dinghwah Jun 13, 2025
815a321
Update with --add-traceback
dinghwah Jun 13, 2025
2cb8075
Update with --add-tracefile $jsonfiles
dinghwah Jun 13, 2025
e688ef4
Add test only --add-tracefile for debug
dinghwah Jun 14, 2025
fcc019f
Try python3.11
dinghwah Jun 16, 2025
ebe9777
Update RUN apt-get -qqy install python3.11
dinghwah Jun 16, 2025
d31b0fb
Use dnf
phender Jun 16, 2025
c5cf716
Remove export GCOV_PREFIX
dinghwah Jun 17, 2025
24e1ab8
DAOS-17664 cq: update gha versions (#16490)
dependabot[bot] Jun 12, 2025
04c3ec5
DAOS-17432 test: Update suppressions for Go runtime (#16310)
kjacque Jun 12, 2025
b842179
DAOS-17651 test: Increase timeout for recovery/pool_list_consolidatio…
shimizukko Jun 12, 2025
7c356aa
DAOS-17705 cq: Bump github/codeql-action from 3.28.19 to 3.29.0 (#16513)
dependabot[bot] Jun 16, 2025
139e835
DAOS-17049 control: Allow graceful shutdown for specific ranks (#16305)
kjacque Jun 16, 2025
ac2841e
DAOS-17594 cart: allocate iov buffer for deferred bulk #16430 (#16454)
frostedcmos Jun 17, 2025
4c6ef14
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Jun 17, 2025
e952d42
Update GCOV_PREFIX_STRIP=7
dinghwah Jun 17, 2025
0a4fdd7
Tmp comment out mv nlt-errors.json
dinghwah Jun 17, 2025
8cdf246
Restore test_nlt_post and update $pwd)
dinghwah Jun 18, 2025
255ade0
Update rsync to /tmp/code_coverage
dinghwah Jun 18, 2025
a3bba2c
Update include code_coverage/*
dinghwah Jun 18, 2025
32eb7cc
Add debug /tmp/code_coverage after nlt gcovr
dinghwah Jun 19, 2025
102345f
Update rsync .. include code_coverage*
dinghwah Jun 19, 2025
5d82b58
Remove the unneed comment statements
dinghwah Jun 19, 2025
4ab1dbe
Cleanup and debug for required file.
dinghwah Jun 23, 2025
f3e6801
Debug commented out CGO_CFLAGS per Jeff's comment
dinghwah Jun 23, 2025
10419c9
Tmp comment out env.AppendENVPath('CGO_LDFLAGS'..) per Jeff's comment
dinghwah Jun 23, 2025
0756c64
Restore env.AppendENVPath('CGO_LDFLAGS'..)
dinghwah Jun 23, 2025
893e431
Update /daos_srv
dinghwah Jun 24, 2025
8fca02a
Cleanup and all unit-tests
dinghwah Jun 24, 2025
ab443e5
Restore env.AppendUnique(CGO_CFLAGS=..)
dinghwah Jun 25, 2025
8df15d8
Update env.AppendENVPath('CGO_LDFLAGS',..)
dinghwah Jun 25, 2025
879b9a4
Restore env.AppendUnique(CGO_CFLAGS=..)
dinghwah Jun 25, 2025
c27106d
Update for time build
dinghwah Jun 26, 2025
31b4be0
Fixed typo for startedByTimer
dinghwah Jun 26, 2025
d9165af
Fix skip logic
dinghwah Jun 26, 2025
80131da
Test for python3
dinghwah Jul 2, 2025
a32894c
Restore back to python3.11
dinghwah Jul 3, 2025
2c082d6
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Jul 3, 2025
0b306b6
Tmp comment out build on EL9 and Leap15.5 stages
dinghwah Jul 3, 2025
90f5adf
Update is_code_coverage to Build on EL9 and Leap15.5
dinghwah Jul 3, 2025
05b8ae4
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Jul 4, 2025
3c2f73d
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Jul 9, 2025
8895069
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Aug 5, 2025
c223951
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Aug 29, 2025
f74e92f
Add debug display *.gcno & *.gcda
dinghwah Aug 29, 2025
08c7fc6
Added gcovr gcov-ignore-error
dinghwah Aug 29, 2025
7c04eb8
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Sep 10, 2025
7c73ed7
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Sep 12, 2025
4fa9d9b
pipeline-lib updates.
phender Sep 12, 2025
7e0c5ee
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Sep 19, 2025
cc601c9
Go back to pipeline-lib hendersp/DAOS-17259
phender Sep 19, 2025
d11f36e
Fix typo.
phender Sep 19, 2025
4a7b5b1
Installing python 3.11 in el8 docker image
phender Sep 20, 2025
c0e5848
Revert previous change.
phender Sep 20, 2025
74c6dc0
Use sudo dnf
phender Sep 20, 2025
c182a24
Update python
phender Sep 22, 2025
f0f64c0
Adding env.PYTHON_VERSION.
phender Sep 22, 2025
afa8853
Hardcode python version.
phender Sep 22, 2025
e4ab2ea
Trying a different approach
phender Sep 22, 2025
0029e06
Fix pip install.
phender Sep 22, 2025
84e0419
Move to python 3.11
phender Sep 22, 2025
9d24e4e
Usse same python version installed in dockerfile
phender Sep 22, 2025
5d8f4ae
Adding -vvv to pip
phender Sep 23, 2025
594d85a
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Sep 24, 2025
9dc61ba
Trying separate dockerfile for summary stage.
phender Sep 24, 2025
6cdbb4d
Removing no longer used --build-arg.
phender Sep 24, 2025
b8c76d8
Fix previous edit.
phender Sep 24, 2025
e1939c4
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Sep 24, 2025
e43c766
Updated requirements files.
phender Sep 24, 2025
9377a99
Trying setting pip proxy.
phender Sep 24, 2025
aa3bf09
Use the correct python version in the dockerfile
phender Sep 24, 2025
1b974dd
Add missing Dockefile ARG.
phender Sep 24, 2025
00c4e1a
Remove the no longer needed storage_estimator workaround
phender Sep 24, 2025
1ca09d0
Fix pip config setup.
phender Sep 25, 2025
448f20f
Adding pip debug.
phender Sep 25, 2025
9aefb73
Fix pip proxy setting.
phender Sep 25, 2025
11b174e
Updates.
phender Sep 25, 2025
a1e323c
Update HTTPS_PROXY GCOV_PREFIX
dinghwah Sep 30, 2025
728a21d
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Nov 7, 2025
97ce9f1
Fix spaces.
dinghwah Nov 7, 2025
bf5d18a
Update CGO_LDFLAGS with lgcov
dinghwah Nov 12, 2025
091b151
Update find \*.gcno
dinghwah Nov 13, 2025
67570bf
Update find src
dinghwah Nov 13, 2025
9bf4d70
Update path to find gcno file
dinghwah Nov 13, 2025
8d9df15
Update find
dinghwah Nov 13, 2025
b2861b8
Fix run_go_tests CGO_LDFLAGS assignment for code coverage.
phender Nov 14, 2025
cf57222
Skip running abt_stack with code coverage.
phender Nov 14, 2025
4e585db
Fix code coverage detection for unit tests
phender Nov 14, 2025
5d31160
Fix skipping abt_stack
phender Nov 14, 2025
a9f94cc
Fix typo and exclude NLT w/ code coverage
phender Nov 14, 2025
983e651
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Nov 24, 2025
95d10fa
Moving requirements-*.txt changes to PR-16919.
phender Nov 24, 2025
5b148f6
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Nov 25, 2025
04afec9
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Nov 26, 2025
876c06c
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Dec 1, 2025
19da5a9
Fix GHA ubuntu python version.
phender Dec 1, 2025
33f523b
Fix ubuntu python version
phender Dec 2, 2025
8e3415f
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
dinghwah Dec 3, 2025
74999a9
Update per Phil's comment.
dinghwah Dec 3, 2025
3b64b2c
Fix pylint issue
dinghwah Dec 3, 2025
314576b
Update debug
dinghwah Dec 5, 2025
623e61a
Add Debug to find build
dinghwah Dec 6, 2025
42ec327
Merge branch 'master' into dinghwah/DAOS-17259-gtest2
phender Dec 9, 2025
db96ad0
Debug
phender Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
!requirements-build.txt
!requirements-utest.txt
!requirements-ftest.txt
!requirements-code-coverage.txt

# Now disallow extra files which may be present but are not required.
# Include the rdb repo as well.
Expand Down
90 changes: 74 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,22 @@ Boolean skip_build_stage(String distro='', String compiler='gcc') {
return false
}

Boolean is_code_coverage() {
if (startedByTimer()) {
return true
}
return paramsValue('CI_CODE_COVERAGE', false)
}

pipeline {
agent { label 'lightweight' }

triggers {
// Generate a code coverage report each Sunday
/* groovylint-disable-next-line AddEmptyString */
cron(env.BRANCH_NAME == 'master' ? 'TZ=UTC\n0 6 * * 0' : '')
}

environment {
GITHUB_USER = credentials('daos-jenkins-review-posting')
SSH_KEY_ARGS = '-ici_key'
Expand All @@ -230,6 +243,7 @@ pipeline {
REPO_FILE_URL = repoFileUrl(env.REPO_FILE_URL)
SCONS_FAULTS_ARGS = sconsArgs()
HTTPS_PROXY = ''
PYTHON_VERSION = '3.11'
}

options {
Expand Down Expand Up @@ -305,6 +319,9 @@ pipeline {
booleanParam(name: 'CI_leap15_NOBUILD',
defaultValue: false,
description: 'Do not build sources and RPMs on Leap 15')
booleanParam(name: 'CI_CODE_COVERAGE',
defaultValue: false,
description: 'Run with code coverage analysis')
booleanParam(name: 'CI_ALLOW_UNSTABLE_TEST',
defaultValue: false,
description: 'Continue testing if a previous stage is Unstable')
Expand Down Expand Up @@ -552,7 +569,8 @@ pipeline {
build_deps: 'no',
stash_opt: true,
scons_args: sconsArgs() +
' PREFIX=/opt/daos TARGET_TYPE=release'))
' PREFIX=/opt/daos TARGET_TYPE=release',
code_coverage: is_code_coverage()))
sh label: 'Generate RPMs',
script: './ci/rpm/gen_rpms.sh el8 "' + env.DAOS_RELVAL + '"'
}
Expand Down Expand Up @@ -604,7 +622,8 @@ pipeline {
build_deps: 'no',
stash_opt: true,
scons_args: sconsArgs() +
' PREFIX=/opt/daos TARGET_TYPE=release'))
' PREFIX=/opt/daos TARGET_TYPE=release',
code_coverage: is_code_coverage()))
sh label: 'Generate RPMs',
script: './ci/rpm/gen_rpms.sh el9 "' + env.DAOS_RELVAL + '"'
}
Expand Down Expand Up @@ -651,9 +670,10 @@ pipeline {
script: './ci/rpm/build_deps.sh'
job_step_update(
sconsBuild(parallel_build: true,
scons_args: sconsFaultsArgs() +
' PREFIX=/opt/daos TARGET_TYPE=release',
build_deps: 'yes'))
scons_args: sconsFaultsArgs() +
' PREFIX=/opt/daos TARGET_TYPE=release',
code_coverage: is_code_coverage(),
build_deps: 'yes'))
sh label: 'Generate RPMs',
script: './ci/rpm/gen_rpms.sh suse.lp155 "' + env.DAOS_RELVAL + '"'
}
Expand Down Expand Up @@ -752,7 +772,7 @@ pipeline {
}
steps {
job_step_update(
unitTest(timeout_time: 60,
unitTest(timeout_time: 120,
unstash_opt: true,
inst_repos: daosRepos(),
inst_rpms: unitPackages()))
Expand All @@ -767,7 +787,7 @@ pipeline {
stage('NLT on EL 8.8') {
when {
beforeAgent true
expression { params.CI_NLT_TEST && !skipStage() }
expression { params.CI_NLT_TEST && !skipStage() && !is_code_coverage() }
}
agent {
label params.CI_NLT_1_LABEL
Expand Down Expand Up @@ -814,16 +834,15 @@ pipeline {
}
steps {
job_step_update(
unitTest(timeout_time: 160,
unitTest(timeout_time: 250,
unstash_opt: true,
ignore_failure: true,
inst_repos: daosRepos(),
inst_rpms: unitPackages()))
}
post {
always {
unitTestPost artifacts: ['unit_test_memcheck_logs.tar.gz',
'unit_test_memcheck_logs/**/*.log'],
unitTestPost artifacts: ['unit_test_memcheck_logs/'],
valgrind_stash: 'el8-gcc-unit-memcheck'
job_status_update()
}
Expand All @@ -839,16 +858,15 @@ pipeline {
}
steps {
job_step_update(
unitTest(timeout_time: 180,
unitTest(timeout_time: 450,
unstash_opt: true,
ignore_failure: true,
inst_repos: daosRepos(),
inst_rpms: unitPackages()))
}
post {
always {
unitTestPost artifacts: ['unit_test_memcheck_bdev_logs.tar.gz',
'unit_test_memcheck_bdev_logs/**/*.log'],
unitTestPost artifacts: ['unit_test_memcheck_bdev_logs/'],
valgrind_stash: 'el8-gcc-unit-memcheck-bdev'
job_status_update()
}
Expand All @@ -859,9 +877,9 @@ pipeline {
stage('Test') {
when {
beforeAgent true
//expression { !paramsValue('CI_FUNCTIONAL_TEST_SKIP', false) && !skipStage() }
// expression { !paramsValue('CI_FUNCTIONAL_TEST_SKIP', false) && !skipStage() }
// Above not working, always skipping functional VM tests.
expression { !paramsValue('CI_FUNCTIONAL_TEST_SKIP', false) }
expression { !paramsValue('CI_FUNCTIONAL_TEST_SKIP', false) && !is_code_coverage() }
}
parallel {
stage('Functional on EL 8.8 with Valgrind') {
Expand Down Expand Up @@ -1128,7 +1146,7 @@ pipeline {
stage('Test Hardware') {
when {
beforeAgent true
expression { !paramsValue('CI_FUNCTIONAL_HARDWARE_TEST_SKIP', false) && !skipStage() }
expression { !paramsValue('CI_FUNCTIONAL_HARDWARE_TEST_SKIP', false) && !skipStage() && !is_code_coverage() }
}
steps {
script {
Expand Down Expand Up @@ -1237,6 +1255,46 @@ pipeline {
}
}
} // stage('Test Hardware')
stage('Test Summary') {
when {
beforeAgent true
expression { true }
}
parallel {
stage('Code Coverage Report') {
when {
beforeAgent true
expression { params.CI_CODE_COVERAGE }
}
agent {
dockerfile {
filename 'utils/docker/Dockerfile.el.8'
label 'docker_runner'
additionalBuildArgs dockerBuildArgs(add_repos: false) +
" --build-arg PYTHON_VERSION=${env.PYTHON_VERSION}"
}
}
steps {
job_step_update(
runScriptWithStashes(
stashes: ['code_coverage_Unit_Test_on_EL_8.8',
'code_coverage_Unit_Test_bdev_on_EL_8.8',
'code_coverage_NLT_on_EL_8.8',
'code_coverage_Unit_Test_with_memcheck_on_EL_8.8',
'code_coverage_Unit_Test_bdev_with_memcheck_on_EL_8.8'],
script: 'ci/code_coverage_report.sh',
label: 'Code Coverage Report'))
}
post {
always {
archiveArtifacts artifacts: 'code_coverage_report/*',
allowEmptyArchive: false
job_status_update()
}
}
} // stage('Code Coverage Report')
} // parallel
} // stage('Test Summary')
} // stages
post {
always {
Expand Down
12 changes: 12 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ def add_command_line_options():
use the specified relative sub-directory containing all \
dependencies as git submodules instead')

# generate code coverage
AddOption('--code-coverage',
action='store_true',
dest='code_coverage',
default=False,
help='enable code coverage analyze with gcov')


def parse_and_save_conf(env, opts_file):
"""Parse daos.conf
Expand Down Expand Up @@ -469,6 +476,11 @@ def scons():
# This will add a final 'DEPS' value to opts but it will not be persistent.
prereqs.run_build(opts)

have_hdf5 = False
if prereqs.check_component('hdf5'):
have_hdf5 = True
Export('have_hdf5')

if GetOption('build_deps') == 'only':
prereqs.save_build_info()
print('Exiting because --build-deps=only was set')
Expand Down
19 changes: 19 additions & 0 deletions ci/code_coverage_report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -eux

: "${PYTHON_VERSION:=3.11}"

# Generate code coverage report
if [[ -n $(find . -name "code_coverage.json") ]]; then
"python${PYTHON_VERSION}" -m venv venv
# shellcheck disable=SC1091
source venv/bin/activate
pip install --upgrade pip

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 3: pipCommand not pinned by hash
Click Remediation section below to solve this issue
pip install --requirement requirements-code-coverage.txt

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 3: pipCommand not pinned by hash
Click Remediation section below to solve this issue

mkdir -p code_coverage_report
gcovr --add-tracefile "*/code_coverage/code_coverage.json" \
--output code_coverage_report/code_coverage_report.html \
--html-details --gcov-ignore-parse-errors
fi
4 changes: 2 additions & 2 deletions ci/provisioning/post_provision_config_nodes_EL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ group_repo_post() {

distro_custom() {
# TODO: This code is not exiting on failure.
: "${PYTHON_VERSION:=3.11}"

# Use a more recent python version for unit testing, this allows us to also test installing
# pydaos into virtual environments.
dnf -y install python39 python39-devel
dnf -y install python3.11 python3.11-devel
dnf -y install "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-devel"
}

install_mofed() {
Expand Down
5 changes: 5 additions & 0 deletions ci/provisioning/post_provision_config_nodes_LEAP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ distro_custom() {
sed -e '/MODULEPATH=/s/$/:\/usr\/share\/modules/' \
/etc/profile.d/lmod.sh; \
fi

# Use a more recent python version for unit testing, this allows us to also test installing
# pydaos into virtual environments.
: "${PYTHON_VERSION:=}"
dnf -y install "python${PYTHON_VERSION//./}" "python${PYTHON_VERSION//./}-devel"
}
32 changes: 24 additions & 8 deletions ci/unit/test_main_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,34 @@

rm -rf "$test_log_dir"

# Use default python as that's where storage_estimator is installed.
python3 -m venv venv
: "${PYTHON_VERSION:=3.11}"
"python${PYTHON_VERSION}" -m venv venv
# shellcheck disable=SC1091
source venv/bin/activate
# touch venv/pip.conf
# pip config set global.progress_bar off
# pip config set global.no_color true

touch venv/pip.conf
pip config set global.progress_bar off
pip config set global.no_color true
pip install --upgrade pip
pip install --requirement requirements-utest.txt

pip install /opt/daos/lib/daos/python/

WITH_CODE_COVERAGE="no"
if [[ -n $(find build -name "*.gcno" | xargs ls -la) ]]; then

Check failure on line 95 in ci/unit/test_main_node.sh

View workflow job for this annotation

GitHub Actions / ShellCheck

Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. [SC2038]
WITH_CODE_COVERAGE="yes"
fi

HTTPS_PROXY="${DAOS_HTTPS_PROXY:-}" utils/run_utest.py $RUN_TEST_VALGRIND \
--no-fail-on-error $VDB_ARG --log_dir="$test_log_dir" $SUDO_ARG
--no-fail-on-error $VDB_ARG --log_dir="$test_log_dir" $SUDO_ARG \
--with_code_coverage="$WITH_CODE_COVERAGE"

# Generate code coverage report if at least one gcda file was generated
if [ "$WITH_CODE_COVERAGE" = "yes" ]; then
pip install --requirement requirements-code-coverage.txt
Comment thread Fixed
Comment thread Fixed
Comment thread Fixed

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium test

score is 3: pipCommand not pinned by hash
Click Remediation section below to solve this issue
find . -name "*.gcno" | xargs ls -la

Check failure on line 106 in ci/unit/test_main_node.sh

View workflow job for this annotation

GitHub Actions / ShellCheck

Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. [SC2038]
find . -name "*.gcda" | xargs ls -la

Check failure on line 107 in ci/unit/test_main_node.sh

View workflow job for this annotation

GitHub Actions / ShellCheck

Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. [SC2038]
find . -name "*.c" | xargs ls -la

Check failure on line 108 in ci/unit/test_main_node.sh

View workflow job for this annotation

GitHub Actions / ShellCheck

Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. [SC2038]
find . -name "*.h" | xargs ls -la

Check failure on line 109 in ci/unit/test_main_node.sh

View workflow job for this annotation

GitHub Actions / ShellCheck

Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. [SC2038]
mkdir -p "${test_log_dir}/code_coverage"
gcovr --json "${test_log_dir}/code_coverage/code_coverage.json" --gcov-ignore-parse-errors \
--gcov-ignore-errors=no_working_dir_found
fi
4 changes: 2 additions & 2 deletions ci/unit/test_nlt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ rm -rf dnt.*.memcheck.xml vm_test/
NODE=${NODELIST%%,*}
mydir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

# Copy over the install tree and some of the build tree.
rsync -rlpt -z -e "ssh $SSH_KEY_ARGS" .build_vars* opt-daos.tar utils requirements-utest.txt jenkins@"$NODE":build/
# Copy over the install tree and the build tree.
rsync -rlpt -z -e "ssh $SSH_KEY_ARGS" . jenkins@"$NODE":build/

# shellcheck disable=SC2029
ssh -tt "$SSH_KEY_ARGS" jenkins@"$NODE" "DAOS_HTTPS_PROXY=\"${DAOS_HTTPS_PROXY:-}\" \
Expand Down
24 changes: 19 additions & 5 deletions ci/unit/test_nlt_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,35 @@ sudo bash -c ". ./utils/sl/setup_local.sh; ./utils/setup_daos_server_helper.sh"
# --server-valgrind all

# Use the latest version that CI has available.
python3.11 -m venv venv
: "${PYTHON_VERSION:=3.11}"
"python${PYTHON_VERSION}" -m venv venv
# shellcheck disable=SC1091
source venv/bin/activate
touch venv/pip.conf
pip config set global.progress_bar off
pip config set global.no_color true

pip install --upgrade pip
pip install --requirement requirements-utest.txt

pip install /opt/daos/lib/daos/python/

# set high open file limit in the shell to avoid extra warning
sudo prlimit --nofile=1024:262144 --pid $$
prlimit -n

HTTPS_PROXY="${DAOS_HTTPS_PROXY:-}" ./utils/node_local_test.py --max-log-size 1950MiB \
--dfuse-dir /localhome/jenkins/ --log-usage-save nltir.xml --log-usage-export nltr.json all
cwd="$(pwd)"
# export GCOV_PREFIX="${cwd}"
# export GCOV_PREFIX_STRIP="7"
# HTTPS_PROXY="${DAOS_HTTPS_PROXY:-}" ./utils/node_local_test.py --max-log-size 1950MiB \
# --dfuse-dir /localhome/jenkins/ --log-usage-save nltir.xml --log-usage-export nltr.json all

GCOV_PREFIX="${cwd}" GCOV_PREFIX_STRIP="7" HTTPS_PROXY="${DAOS_HTTPS_PROXY:-}" \
./utils/node_local_test.py --max-log-size 1950MiB --dfuse-dir /localhome/jenkins/ \
--log-usage-save nltir.xml --log-usage-export nltr.json all

# Generate code coverage report if at least one gcda file was generated
if [[ -n $(find build -name "*.gcda") ]]; then
pip install --requirement requirements-code-coverage.txt
Comment thread Fixed
Comment thread Fixed
Comment thread Fixed
Comment thread Dismissed

mkdir -p /tmp/code_coverage
gcovr --json /tmp/code_coverage/code_coverage.json --gcov-ignore-parse-errors
fi
2 changes: 1 addition & 1 deletion ci/unit/test_nlt_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mkdir nlt_logs
# standard wildcards.
rsync -v -dprt -e "ssh $SSH_KEY_ARGS" jenkins@"$NODE":/tmp/ \
--filter="include dnt*.log" --filter="include dnt*.log.bz2" \
--filter="include dnt_fi_*_logs" \
--filter="include dnt_fi_*_logs" --filter="include code_coverage*" \
--filter="exclude *" nlt_logs/

rsync -v -dpt -z -e "ssh $SSH_KEY_ARGS" jenkins@"$NODE":build/ \
Expand Down
4 changes: 2 additions & 2 deletions ci/unit/test_post_always.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ esac

mkdir -p "$test_log_dir"

rsync -v -rlpt -z -e "ssh $SSH_KEY_ARGS" jenkins@"$NODE":build/ .
rsync -v -rlpt -z -e "ssh $SSH_KEY_ARGS" jenkins@"$NODE":build/ --exclude="venv" .

# Copy any log files. Use rsync filters here to allow us to specify
# all files we want to copy, as it's much more flexible than using
# standard wildcards.
rsync -v -dpt -z -e "ssh $SSH_KEY_ARGS" jenkins@"$NODE":/tmp/ \
--filter="include daos*.log" --filter="include test.cov" \
--filter="include daos*.log" --filter="include code_coverage/*" \
--filter="exclude *" "$test_log_dir/"
3 changes: 3 additions & 0 deletions requirements-code-coverage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcovr
junit-xml
pyyaml
Loading
Loading