-
Notifications
You must be signed in to change notification settings - Fork 135
fix e2e shell script error #1527
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
Conversation
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Summary of ChangesHello @LiZhenCheng9527, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a minor but important bug in the end-to-end (e2e) test cleanup script. The change ensures that log files generated during the tests are correctly removed by fixing the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. A script ran astray, 'rm rf' was not the way, '-rf' clears the path. Footnotes
|
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.
Code Review
This pull request correctly fixes a typo in the rm command in test/e2e/run_test.sh, changing rm rf to rm -rf. This prevents an error during the e2e test cleanup. While reviewing, I noticed a related critical issue in the script that I'm unable to comment on directly due to review constraints. On line 432, the command cat $LOGFILE is executed when tests fail. Because set -e is active, this will cause the script to exit prematurely if $LOGFILE does not exist, skipping crucial cleanup steps. I strongly recommend modifying the conditional block around line 432 to check for the file's existence, for example: if [ $EXIT_CODE -ne 0 ] && [ -f "$LOGFILE" ]; then cat "$LOGFILE"; fi. I have also added a comment to quote the $LOGFILE variable in the rm command for better robustness.
| fi | ||
|
|
||
| rm rf $LOGFILE | ||
| rm -rf $LOGFILE |
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: