-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: grep for failures in CI #6339
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
Changes from 7 commits
2d529a2
22a25cf
3fddd79
82d7645
78f11bc
1294aac
7e804a5
d4bc64b
4d385e9
8760f80
7e53b33
de3a64c
322ac32
967bdc4
4505091
ea61d6d
2bae8ee
c6cfdf1
eceb5fc
6964335
715916e
93d0e12
9028c2e
404451a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -229,7 +229,14 @@ jobs: | |
| env: | ||
| BUILD_NPROC: ${{ steps.nproc.outputs.nproc }} | ||
| run: | | ||
| ./xrpld --unittest --unittest-jobs "${BUILD_NPROC}" | ||
| ./xrpld --unittest --unittest-jobs "${BUILD_NPROC}" 2>&1 | tee unittest.log | ||
| exit ${PIPESTATUS[0]} | ||
|
|
||
| - name: Show test failure summary | ||
|
Comment on lines
+232
to
+235
|
||
| if: ${{ failure() && !inputs.build_only }} | ||
| working-directory: ${{ runner.os == 'Windows' && format('{0}/{1}', env.BUILD_DIR, inputs.build_type) || env.BUILD_DIR }} | ||
| run: | | ||
| grep -E "failed" unittest.log || echo "No failure details found in log" | ||
mvadari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
mvadari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - name: Debug failure (Linux) | ||
| if: ${{ failure() && runner.os == 'Linux' && !inputs.build_only }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4973,20 +4973,19 @@ class Vault_test : public beast::unit_test::suite | |||||
| env.close(); | ||||||
|
|
||||||
| // 2. Mantissa larger than uint64 max | ||||||
| env.set_parse_failure_expected(true); | ||||||
| try | ||||||
| { | ||||||
| tx[sfAssetsMaximum] = "18446744073709551617e5"; // uint64 max + 1 | ||||||
| env(tx, THISLINE); | ||||||
| BEAST_EXPECT(false); | ||||||
| fail("Expected parse_error for mantissa larger than uint64 max"); | ||||||
|
||||||
| fail("Expected parse_error for mantissa larger than uint64 max"); | |
| BEAST_EXPECTS(false, "Expected parse_error for mantissa larger than uint64 max"); |
Copilot
AI
Feb 12, 2026
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.
set_parse_failure_expected(false) won’t run if an unexpected exception type is thrown (or an early abort/throw occurs), which can leak the 'expected parse failure' state into subsequent checks. Prefer a scope guard/RAII helper that resets the flag in its destructor, or structure this so the reset happens on all exit paths.
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.
My understanding was that an
exitcommand will prevent the rest of the commands to run, even if the exit code is 0.The reason it works here is because there are no non-
failure()steps that follow this, but if we ever need to add another step then this might lead to unexpected behavior (until the developer notices theexitstatement which, since it's unusual to see them outside of if-statements, is easy to overlook).Would the following work?
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.
Augment was concerned that
PIPESTATUSmight be overwritten in this case, so I changed it to something related.