-
Notifications
You must be signed in to change notification settings - Fork 349
DAOS-19111 build: Enable code coverage #18478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
phender
wants to merge
14
commits into
release/2.8
Choose a base branch
from
hendersp/DAOS-19111
base: release/2.8
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
79fd209
DAOS-19111 build: Enable code coverage
phender 99444d9
Fix typo.
phender 615a57e
Update CI_FULL_BULLSEYE_REPORT handling
phender 629ced7
Replace runCondition
phender 915a545
Set executable permissions.
phender 7a1c3be
Fix stage skipping.
phender a6cb3aa
Enhancements.
phender aba00da
Small revert.
phender 558a611
Pass logs to unit test always script.
phender 5a16675
Fix daos RPM dependency
phender 9d2c8e2
Cleanup.
phender 4b3b62b
Test fixes.
phender b2e2938
Fix Test Hardware
phender 47f5f0b
Fix running HW satges w/ bullseye
phender File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,17 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Copyright 2025-2026 Hewlett Packard Enterprise Development LP | ||
| # | ||
| # Build DAOS dependencies | ||
| code_coverage="${1:-false}" | ||
| bullseye_key="${2:-}" | ||
| mydir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
|
||
| cd /home/daos/pre || exit 1 | ||
| scons install --build-deps=only USE_INSTALLED=all PREFIX=/opt/daos TARGET_TYPE=release -j 32 | ||
|
|
||
| if [[ "${code_coverage}" == "true" ]] ; then | ||
| pushd "${mydir}/../.." || exit 1 | ||
| utils/rpms/bullseye_build.sh "${bullseye_key}" | ||
| popd || exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Copyright 2026 Hewlett Packard Enterprise Development LP | ||
| # | ||
| # Script for generating a bullseye code coverage report summary | ||
| set -uex | ||
|
|
||
| if [ ! -d '/opt/BullseyeCoverage/bin' ]; then | ||
| echo 'Bullseye not found.' | ||
| exit 1 | ||
| fi | ||
| export COVFILE="${WORKSPACE:-/tmp}/test.cov" | ||
| export PATH="/opt/BullseyeCoverage/bin:$PATH" | ||
|
|
||
| # Merge all coverage files | ||
| cp /opt/BullseyeCoverage/daos/test.cov "${COVFILE}" | ||
| readarray -t cov_files < <(find "${WORKSPACE}" -name test.cov) | ||
| if [ ${#cov_files[@]} -gt 0 ]; then | ||
| covmerge --no-banner --file "${COVFILE}" "${cov_files[@]}" | ||
| fi | ||
|
|
||
| if [ ! -e "$COVFILE" ]; then | ||
| echo "Coverage file ${COVFILE} is missing" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Generate the html report | ||
| rm -fr bullseye_code_coverage_report || true | ||
| mkdir bullseye_code_coverage_report | ||
| cd bullseye_code_coverage_report | ||
| mkdir sources | ||
| tar -xf /opt/BullseyeCoverage/daos/bullseye_sources.tar.gz -C sources/ | ||
| covhtml --srcdir sources --file "${COVFILE}" . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Copyright 2026 Hewlett Packard Enterprise Development LP | ||
| # | ||
| # Script for installing packages used for CI summary steps | ||
| set -uex | ||
|
|
||
| id | ||
| if [ "$(id -u)" = "0" ]; then | ||
| echo "Should not be run as root" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Distro name for the repository path for accessing packages built by CI | ||
| distro_name="${1:-el9}" | ||
| code_coverage="${2:-false}" | ||
|
|
||
| # Import provisioning functions to add the repo | ||
| mydir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
| files=("$mydir/../parse_ci_envs.sh") | ||
| files+=("$mydir/../provisioning/post_provision_config_common_functions.sh") | ||
| for src_file in "${files[@]}"; do | ||
| if [ -e "${src_file}" ]; then | ||
| # shellcheck source=parse_ci_envs.sh disable=SC1091 | ||
| source "${src_file}" | ||
| fi | ||
| done | ||
|
|
||
| env | sort -n | ||
|
|
||
| # Add the repo for packages built by CI | ||
| add_inst_repo "daos" "${BRANCH_NAME}" "${BUILD_NUMBER}" "${distro_name}" "${code_coverage}" "true" | ||
|
|
||
| # Install bullseye | ||
| export DISTRO="${distro_name}" | ||
| bullseye_pkg="$(utils/rpms/package_version.sh bullseye normal)" | ||
| sudo dnf install --allowerasing -y "${bullseye_pkg}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check