-
Notifications
You must be signed in to change notification settings - Fork 2
Set and use SCRIPT_NAME variable
#85
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
|
Warning Rate limit exceeded@mernst has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 30 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSeven shell scripts were modified. Several scripts (experiment-scripts/*, get-all-subject-src.sh, mutation-evosuite.sh, mutation-randoop.sh) add a SCRIPT_NAME variable and replace direct basename "$0" uses with it. scripts/clean-script-dir.sh renames Pre-merge checks and finishing touches❌ Failed checks (1 warning)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
scripts/clean-script-dir.sh(1 hunks)scripts/experiment-scripts/mutation-fig6-table3.sh(3 hunks)scripts/experiment-scripts/mutation-fig7.sh(2 hunks)scripts/experiment-scripts/mutation-fig8-9.sh(2 hunks)scripts/get-all-subject-src.sh(1 hunks)scripts/mutation-evosuite.sh(3 hunks)scripts/mutation-randoop.sh(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-14T03:30:11.765Z
Learnt from: varuniy
Repo: randoop/grt-testing PR: 64
File: scripts/defects4j-randoop.sh:332-335
Timestamp: 2025-10-14T03:30:11.765Z
Learning: In defects4j-randoop.sh, the script intentionally removes RegressionTest.java and ErrorTest.java (the driver/suite files) after test generation because run_bug_detection.pl does not expect these files. The numbered test files (RegressionTest0.java, RegressionTest1.java, ErrorTest0.java, etc.) remain in TEST_DIR and are packaged for defect detection.
Applied to files:
scripts/mutation-evosuite.shscripts/mutation-randoop.sh
🔇 Additional comments (7)
scripts/clean-script-dir.sh (1)
9-10: Good standardization of script-level variable naming.The rename from
script_dirtoSCRIPT_DIRaligns with bash conventions for script-level constants and the broader standardization effort across the repository. The variable is correctly referenced in thecdcommand, and error handling is preserved.scripts/get-all-subject-src.sh (1)
8-8: LGTM: Consistent script identification added.The introduction of
SCRIPT_NAMEand its use in the error message improves script identification in logs and error output, following the pattern applied across related scripts.Also applies to: 12-12
scripts/experiment-scripts/mutation-fig7.sh (1)
36-36: LGTM: Script name standardization for log output.Replacing inline
basename "$0"with theSCRIPT_NAMEvariable improves consistency and avoids repeated command invocations.Also applies to: 65-65
scripts/experiment-scripts/mutation-fig8-9.sh (1)
40-40: LGTM: Consistent script identification across figure generation scripts.The
SCRIPT_NAMEvariable replaces the inlinebasename "$0"call for consistency with sibling scripts.Also applies to: 70-70
scripts/experiment-scripts/mutation-fig6-table3.sh (1)
36-36: LGTM: Improved error diagnostics in parallel task execution.Adding
SCRIPT_NAMEprefix and explicit exit code (2) to the invalid mode error provides better diagnostic context when tasks fail in the parallel execution flow.Also applies to: 62-62, 97-98
scripts/mutation-evosuite.sh (1)
61-61: LGTM: Standardized argument handling with script identification.The addition of
SCRIPT_NAMEfor prefixing error/usage messages, combined with early validation andUUIDgeneration for concurrency safety, represents a well-structured improvement. The getopts parsing (lines 81–124) provides clear, maintainable argument handling.Also applies to: 70-73, 78-78, 129-129
scripts/mutation-randoop.sh (1)
65-65: LGTM: Comprehensive argument parsing and script identification.The structured getopts parsing, early validation with
SCRIPT_NAMEprefixing, andUUIDgeneration for concurrency safety represent solid improvements. The feature parsing and validation logic (lines 160–173) is well-organized and maintainable.Also applies to: 76-79, 85-85, 88-137
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.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/mutation-evosuite.sh (1)
52-56: Align Java version check exit code with mutation-randoop.sh.The Java version check exits with code 1, while the equivalent code in
mutation-randoop.shexits with code 2. For consistency across similar scripts and alignment with the PR's standardization of exit code 2 for critical setup failures, update this toexit 2.if [[ "$JAVA_VER" -ne 18 ]]; then echo "Error: Java version 8 is required. Please install it and try again." - exit 1 + exit 2 fi
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
scripts/experiment-scripts/common.sh(1 hunks)scripts/mutation-evosuite.sh(4 hunks)scripts/mutation-randoop.sh(5 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: varuniy
Repo: randoop/grt-testing PR: 64
File: scripts/defects4j-randoop.sh:332-335
Timestamp: 2025-10-14T03:30:11.765Z
Learning: In defects4j-randoop.sh, the script intentionally removes RegressionTest.java and ErrorTest.java (the driver/suite files) after test generation because run_bug_detection.pl does not expect these files. The numbered test files (RegressionTest0.java, RegressionTest1.java, ErrorTest0.java, etc.) remain in TEST_DIR and are packaged for defect detection.
📚 Learning: 2025-10-14T03:30:11.765Z
Learnt from: varuniy
Repo: randoop/grt-testing PR: 64
File: scripts/defects4j-randoop.sh:332-335
Timestamp: 2025-10-14T03:30:11.765Z
Learning: In defects4j-randoop.sh, the script intentionally removes RegressionTest.java and ErrorTest.java (the driver/suite files) after test generation because run_bug_detection.pl does not expect these files. The numbered test files (RegressionTest0.java, RegressionTest1.java, ErrorTest0.java, etc.) remain in TEST_DIR and are packaged for defect detection.
Applied to files:
scripts/mutation-randoop.shscripts/mutation-evosuite.sh
🔇 Additional comments (8)
scripts/experiment-scripts/common.sh (1)
3-7: Exit code standardization for critical setup failure is appropriate.Exit code 2 for the missing Python scenario aligns with the PR's exit code convention for critical setup and argument-related failures.
scripts/mutation-evosuite.sh (3)
60-61: SCRIPT_NAME introduction is correct.The variable is properly defined before use in error messages.
70-73: No-argument guard is well-placed and uses correct exit code.Early guard ensures proper feedback when required arguments are missing.
78-78: UUID-based instance isolation is well-implemented.The per-instance UUID ensures proper isolation when running multiple script instances concurrently, reducing file/directory conflicts. Usage is consistent throughout the script.
Also applies to: 228-229, 416-416
scripts/mutation-randoop.sh (4)
64-65: SCRIPT_NAME is properly introduced.Variable is correctly defined early and available for error messaging throughout the script.
76-79: No-argument guard is well-structured.Early validation with exit code 2 provides clear feedback when required arguments are missing.
160-173: Feature validation and error handling are correct.Unknown feature errors are properly prefixed with
${SCRIPT_NAME}:and exit with code 2, maintaining consistency with other argument-validation errors in the script.
85-85: UUID-based instance isolation is properly implemented.Per-instance UUIDs ensure safe concurrency across multiple iterations and feature combinations, preventing file/directory collisions during parallel execution.
Also applies to: 248-249, 513-513
No description provided.