test: output binary size at _demo/xxx test#1589
Open
fennoai[bot] wants to merge 2 commits intomainfrom
Open
Conversation
- Build binaries to temp directory using `llgo build -o` instead of `llgo run` - Output binary size after each demo build - Collect sizes in a file (using flock for parallel safety) - Output a Markdown table with all binary sizes at the end - Show total size summary Fixes #1588 Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
Contributor
|
@xgopilot check Testing ./_demo/go/readdir
Binary size: 1809 KB (1853400 bytes)
panic: Bad readdir entries go.mod/go.sum
llgo isDir[true]
[0x76C379A6 (null)+0x0, SP = 0x76c2f6cb]
[0x76C28AB8 (null)+0x0, SP = 0x76c2f6cb]
[0x0D02A1CA (null)+0x0, SP = 0x76c2f6cb]
[0x0D02A28B __libc_start_main+0x11, SP = 0x8b]
[0x76C289C5 __libc_start_main+0x11, SP = 0x8b]
FAIL |
Contributor
Author
Fix AppliedRoot Cause: The Fix: Changed the binary execution to run from the demo's source directory: # Before
if "$bin_path"; then
# After
if (cd "$dir" && "$bin_path"); thenThis preserves the working directory context for demos that use relative paths. Commit: ead0aad |
The readdir demo uses relative paths (../), so we need to run the binary from the same directory it was built in to preserve the correct working directory context. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1589 +/- ##
=======================================
Coverage 91.01% 91.01%
=======================================
Files 45 45
Lines 11971 11971
=======================================
Hits 10896 10896
Misses 899 899
Partials 176 176 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Requested by @luoliwoshang
This PR fixes #1588 by adding binary size output when running
.github/workflows/test_demo.sh.Summary
llgo run .tollgo build -oto produce persistent binariesflockfor parallel execution safetyExample Output
Test Plan
test_demo.shand verify binary sizes are output