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
CMake: Simplify run_test.sh and avoid array handling magic #3776
Conversation
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; | ||
done | ||
echo " " | ||
} |
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.
@tjhei Simply restructuring the shell script and removing this arcane magic is also an option.
# same. Create a diff file "diff${variant}" for each variant file that | ||
# is found (including the main comparison file). | ||
# Pick up main comparison file and all variants. A valid variant name is | ||
# of the form [...].output.[STRING] |
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.
You don't enforce the "." after output though, right?
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.
No, I probably don't enforce it. Judging from the snippet below, we pick up everything that matches "${COMPARISON_FILE}"*
.
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.
Now, I also remember the reason. The old variant was
for files in "${COMPARISON_FILE}" "${COMPARISON_FILE}".*; ...
This produces at least a warning if the second expression doesn't match anything.
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.
fair enough.
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.
Looks much nicer!
In reference to #3775