Add frailbox self-test JSON summary#12
Closed
9904099 wants to merge 2 commits into
Closed
Conversation
6c22cb4 to
9bd88e1
Compare
Owner
|
Closing this PR because the linked fork issue is only a closed payout tracker for an already submitted upstream PR. This fork is not an active bounty intake or payment authority, and it is not accepting external submissions or payment details here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a machine-readable JSON summary mode for the frailbox self-test command while keeping the existing text output as the default operator-facing behavior.
This targets #5.
Changes
--self-test-format text|jsonforfrailbox --self-test; default remainstext.name,status,duration_ms, andfailure_reasonon failed tests.--self-test-inject-failure, so the JSON failure path can be tested without introducing flaky external dependencies.make test-selftest-jsonandfrailbox/tests/test_selftest_json.shto cover both a clean self-test run and an injected failing result.docs/OPERATIONS.md.python3 build.py:diagnostic/build-f522e200.jsondiagnostic/build-f522e200-part001.logddiagnostic/build-f522e200-part002.logddiagnostic/build-f522e200-part003.logddiagnostic/build-f522e200-part004.logddiagnostic/build-f522e200-part005.logdTesting
Ran locally:
Results:
make -C frailbox clean test-selftest-jsonpassed. The compiler still emits pre-existing warnings inarena.candlogger.c, but the self-test binary builds and the JSON fixture assertions pass.git diff --check HEAD~2..HEADpassed.python3 build.pypassed all 10 modules:Diagnostic log reassembly/decryption:
cat diagnostic/build-f522e200-part001.logd \ diagnostic/build-f522e200-part002.logd \ diagnostic/build-f522e200-part003.logd \ diagnostic/build-f522e200-part004.logd \ diagnostic/build-f522e200-part005.logd \ > diagnostic/build-f522e200.logd encryptly unpack diagnostic/build-f522e200.logd <outdir> --password 20d5231d891aa69f4476Payout/contact:
50889616@qq.com.Checklist