-
Notifications
You must be signed in to change notification settings - Fork 286
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
feat: print test text when the test fails #1927
Conversation
WalkthroughThe pull request introduces changes to the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/copytests/runner.sh (1)
10-12
: Enhanced Failure Output for Debugging
The revised error handling prints the failure message and immediately outputs the content of the failing test script. This is beneficial for debugging since it provides immediate context. Consider whether additional headers or separators would improve readability in cases of extensive output.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/copytests/runner.sh
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
- GitHub Check: Build for TestDriver.ai
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: 0
🧹 Nitpick comments (14)
tests/copytests/cases/test032.sh (1)
1-1
: Add Shebang DirectiveIt’s advisable to add a shebang (for example, #!/usr/bin/env bash) at the very top of the script. This directly addresses Shellcheck’s SC2148 warning and ensures that the script runs with the intended shell interpreter.
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test034.sh (1)
1-1
: Add Shebang DirectiveFor better portability and to satisfy Shellcheck recommendations, consider adding a shebang (e.g. #!/usr/bin/env bash) as the first line of the script.
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test036.sh (1)
1-1
: Add Shebang DirectiveAdding a shebang (e.g. #!/usr/bin/env bash) at the top will ensure the script is executed with the proper shell and eliminates Shellcheck warnings.
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test037.sh (1)
1-1
: Add Shebang DirectiveTo improve script clarity and avoid shell-detection warnings, please consider inserting a shebang (e.g. #!/usr/bin/env bash) at the very start of the script.
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test038.sh (1)
1-1
: Add Shebang DirectiveAs with the other test scripts, adding a shebang (e.g. #!/usr/bin/env bash) at the top is recommended to ensure consistent execution and to satisfy Shellcheck.
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test040.sh (1)
1-1
: Add Shebang Directive
This script currently starts with a comment and lacks a shebang. Adding a shebang (e.g. “#!/bin/bash”) at the very top ensures that the proper shell is used during execution.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test051.sh (1)
1-1
: Add Shebang Directive
The file does not start with a shebang line. Adding one (e.g. “#!/bin/bash”) can help avoid ambiguity regarding the shell under which the script runs.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test049.sh (1)
1-1
: Add Shebang Directive
Consider adding a shebang (e.g. “#!/bin/bash”) at the top of this script to clearly indicate which shell should execute it.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test041.sh (1)
1-1
: Add Shebang Directive
This test script would benefit from an explicit shebang (e.g. “#!/bin/bash”) at its beginning to ensure consistent execution across environments.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test042.sh (1)
1-1
: Add Shebang Directive
It is recommended to add a shebang line (e.g. “#!/bin/bash”) at the top of this script to avoid potential execution issues related to an unspecified shell environment.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test043.sh (1)
1-1
: Consider Adding a Shebang Directive.
For consistency and to satisfy shellcheck (SC2148), please add a shebang (for example, "#!/bin/bash") at the very top of the file.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test044.sh (1)
1-1
: Consider Adding a Shebang Directive.
Adding a shebang (e.g., "#!/bin/bash") at the top would improve clarity and help static analyzers determine the intended shell environment.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test045.sh (1)
1-1
: Consider Adding a Shebang Directive.
Including a shebang (for example, "#!/bin/bash") at the very start of the script is recommended for clarity and to satisfy shellcheck requirements.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test052.sh (1)
1-1
: Consider Adding a Shebang Directive.
For improved portability and to meet shellcheck suggestions, consider adding a shebang (e.g., "#!/bin/bash") at the top of this file.🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (20)
tests/copytests/cases/test031.sh
(0 hunks)tests/copytests/cases/test032.sh
(1 hunks)tests/copytests/cases/test033.sh
(0 hunks)tests/copytests/cases/test034.sh
(1 hunks)tests/copytests/cases/test035.sh
(0 hunks)tests/copytests/cases/test036.sh
(1 hunks)tests/copytests/cases/test037.sh
(1 hunks)tests/copytests/cases/test038.sh
(1 hunks)tests/copytests/cases/test039.sh
(0 hunks)tests/copytests/cases/test040.sh
(1 hunks)tests/copytests/cases/test041.sh
(2 hunks)tests/copytests/cases/test042.sh
(2 hunks)tests/copytests/cases/test043.sh
(2 hunks)tests/copytests/cases/test044.sh
(2 hunks)tests/copytests/cases/test045.sh
(2 hunks)tests/copytests/cases/test048.sh
(0 hunks)tests/copytests/cases/test049.sh
(2 hunks)tests/copytests/cases/test050.sh
(0 hunks)tests/copytests/cases/test051.sh
(2 hunks)tests/copytests/cases/test052.sh
(1 hunks)
💤 Files with no reviewable changes (6)
- tests/copytests/cases/test031.sh
- tests/copytests/cases/test039.sh
- tests/copytests/cases/test050.sh
- tests/copytests/cases/test035.sh
- tests/copytests/cases/test033.sh
- tests/copytests/cases/test048.sh
🧰 Additional context used
🪛 Shellcheck (0.10.0)
tests/copytests/cases/test042.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test041.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test051.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test034.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test036.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test049.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test037.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test032.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test044.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test043.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test040.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test045.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
tests/copytests/cases/test038.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Build for TestDriver.ai
- GitHub Check: Analyze (go)
🔇 Additional comments (14)
tests/copytests/cases/test032.sh (1)
8-8
: Update Copy CommandThe copy command has been updated from using a recursive flag (‑r) to a simple non‑recursive form (“wsh file copy foo bar”). This change is consistent with the overall refactoring of copy behavior. Please ensure that this new behavior is as intended for copying an empty directory.
tests/copytests/cases/test034.sh (1)
8-8
: Remove Recursive FlagThe command change from “wsh file copy -r bar/ baz” to “wsh file copy bar/ baz” aligns with the new testing approach of non-recursive copy. Verify that the test’s expectations (i.e. the creation of the “baz” directory) remain valid with this updated behavior.
tests/copytests/cases/test036.sh (1)
8-8
: Confirm Non‑Recursive Copy BehaviorThe removal of the “-r” flag in the command (now “wsh file copy bar baz/”) is in line with the updated behavior. Please double-check that non‑recursive copying is indeed the intended functionality for this test case.
tests/copytests/cases/test037.sh (1)
8-8
: Verify Path NotationWhile removing the recursive flag (‑r) is appropriate, the updated command now reads “wsh file copy bar// baz”. Please verify that using a double slash (“bar//”) in the source path is intentional and that the underlying copy functionality handles this path format correctly.
tests/copytests/cases/test038.sh (1)
8-8
: Confirm Target Directory FormatThe command change from “wsh file copy -r bar baz//” to “wsh file copy bar baz//” removes the recursive option. However, please confirm whether the target directory’s trailing double slashes (“baz//”) are intentional and that they do not inadvertently affect directory creation or subsequent tests.
tests/copytests/cases/test040.sh (1)
9-9
: Update Copy Command Syntax
The command on line 9 now omits the “-r” flag (changed from “wsh file copy -r bar baz” to “wsh file copy bar baz”). Please confirm that the non‑recursive copy behavior is intended and that the test’s verification (checking for “baz/foo.txt”) correctly reflects the desired outcome.tests/copytests/cases/test051.sh (1)
10-10
: Update Copy Command Syntax
On line 10, the copy command has been updated from using the recursive flag (“-r”) to “wsh file copy . ../baz”. Verify that this change is intentional and that the test still properly validates the copy operation—especially given that the working directory changes (from “foo” back to the parent) and the expected file “baz/bar.txt” is checked.tests/copytests/cases/test049.sh (1)
11-11
: Update Copy Command Syntax
Line 11 now uses “wsh file copy . ../baz” without the “-r” flag. Please ensure that this reflects the intended non-recursive behavior and that the subsequent verification (checking for the file’s existence in “baz/bar.txt”) is still valid.tests/copytests/cases/test041.sh (1)
10-10
: Update Copy Command Syntax
The command on line 10 has been modified from “wsh file -r bar baz” to “wsh file copy bar baz”. This update implies a shift to non‑recursive copying. Please double-check that the new behavior (and the subsequent file check for “baz/bar/foo.txt”) matches the intended test conditions.tests/copytests/cases/test042.sh (1)
10-10
: Update Copy Command Syntax with Trailing Slash
The copy command on line 10 now reads “wsh file copy bar baz/”. The trailing slash on the destination directory suggests that the content of “bar” should be placed inside “baz”. Verify that the expected behavior (as checked by the test for “baz/bar/foo.txt”) is correct under the new, non‑recursive copy operation.tests/copytests/cases/test043.sh (1)
10-10
: Removal of the -r Flag in the Copy Command.
The command "wsh file copy bar baz/." no longer includes the "-r" flag. Please verify that the underlying copy functionality now handles directory copying as expected without recursion and that the test’s intended outcome (creation of "baz/bar/foo.txt") is still met.tests/copytests/cases/test044.sh (1)
10-10
: Updated Copy Command Without the -r Flag.
The removal of the "-r" flag from "wsh file copy foo qux" is consistent with the overall project changes. Please ensure that this adjustment still results in the expected output (i.e. the file "qux/bar/baz.txt" being present) and that the non-recursive behavior is deliberate.tests/copytests/cases/test045.sh (1)
11-11
: Removal of the -r Flag in the Copy Command.
The copy command "wsh file copy foo qux" (without the -r flag) reflects the intended change. Please double-check that the nested file structure (resulting in "qux/foo/bar/baz.txt") is correctly produced by this command.tests/copytests/cases/test052.sh (1)
17-17
: Updated Directory Copy Command Without the -r Flag.
The change from "wsh file copy -r foo corge/foo" to "wsh file copy foo corge/foo" is consistent with the other test changes. Confirm that this modification correctly preserves the entire directory structure so that later MD5 comparisons accurately reflect equivalent contents.
No description provided.