Skip to content

fixed verific check error#4216

Open
sfmth wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
sfmth:master
Open

fixed verific check error#4216
sfmth wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
sfmth:master

Conversation

@sfmth
Copy link
Copy Markdown

@sfmth sfmth commented May 8, 2026

I was getting this error:

$ ./build_openroad.sh
[INFO FLW-0028] Compiling with 32 threads.                                                                                                                                                                                                                    
[INFO FLW-0027] Saving logs to build_openroad.log                                                                                                                                                                                                             
[INFO FLW-0028] ./build_openroad.sh                                                                                                                                                                                                                           
[INFO FLW-0002] Updating git submodules.                                                                                                                                                                                                                      
[INFO FLW-0000] Using docker build method.                                                                                                                                                                                                                    
[INFO FLW-0020] Building docker image for OpenROAD Flow.                                                                                                                                                                                                      
cp: cannot stat '': No such file or directory

The script was checking for WITH_VERIFIC as not a numeral value, while it is one. and it's working now.

Copy link
Copy Markdown

@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 updates the conditional check for the WITH_VERIFIC variable in build_openroad.sh to use an integer comparison. The reviewer recommends using [[...]] with string comparison and proper variable quoting to improve robustness and maintain consistency with other conditional checks in the script.

Comment thread build_openroad.sh
fi
options=""
if [ -n "${WITH_VERIFIC}" ]; then
if [ ${WITH_VERIFIC} -eq 1 ]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For improved robustness, it's recommended to use [[...]] for tests, quote variables, and use string comparison for flags. This prevents potential issues like word splitting or errors if the variable is not a valid integer. Using [[...]] is also more consistent with other conditional checks in this script (e.g., on line 194).

Suggested change
if [ ${WITH_VERIFIC} -eq 1 ]; then
if [[ "${WITH_VERIFIC}" == "1" ]]; then

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