Skip to content

Add the prefixes to the cmake call in etc/CodeCoverage.sh for Coverity#9476

Merged
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:coverity-prefixes
Feb 16, 2026
Merged

Add the prefixes to the cmake call in etc/CodeCoverage.sh for Coverity#9476
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:coverity-prefixes

Conversation

@openroad-ci
Copy link
Collaborator

No description provided.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds logic to the Coverity script to include additional options in the cmake call by reading them from a file. While the intent is correct, there's a shell quoting issue in the implementation that would cause it to fail. My review provides a correction for this issue.

if [[ -f "/etc/openroad_deps_prefixes.txt" ]]; then
cmakeOptions="$(cat "/etc/openroad_deps_prefixes.txt")"
fi
cmake "${cmakeOptions}" -B build .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The cmakeOptions variable is double-quoted in the cmake call. This will cause all the options read from the file to be passed as a single argument to cmake, which is incorrect. The variable should be expanded without quotes to allow the shell to perform word splitting, so that each option is passed as a separate argument.

Note that this approach can be fragile if any of the options or their values contain spaces. A more robust solution for that case would involve reading the options into a bash array.

Suggested change
cmake "${cmakeOptions}" -B build .
cmake ${cmakeOptions} -B build .

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty maliberty enabled auto-merge February 16, 2026 16:12
@maliberty maliberty merged commit b848e68 into The-OpenROAD-Project:master Feb 16, 2026
13 checks passed
@maliberty maliberty deleted the coverity-prefixes branch February 16, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants