Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1128 +/- ##
=======================================
Coverage 86.64% 86.64%
=======================================
Files 29 29
Lines 7343 7343
=======================================
Hits 6362 6362
Misses 914 914
Partials 67 67 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
xushiwei
reviewed
May 21, 2025
| cmd.Run() | ||
| if s := cmd.ProcessState; s != nil { | ||
| fmt.Fprintf(os.Stderr, "%s: exit code %d\n", app, s.ExitCode()) | ||
| mockable.Exit(s.ExitCode()) |
Member
There was a problem hiding this comment.
don't call s.ExitCode() twice.
xushiwei
reviewed
May 21, 2025
| @@ -513,6 +513,7 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, conf *Co | |||
| cmd.Run() | |||
Member
There was a problem hiding this comment.
check error result:
err = cmd.Run()
if err != nil {
panic(err)
}
Member
Author
There was a problem hiding this comment.
it's maybe a expect error ignore,because with the err check with the cmd.Run() will throw some note releated error stack.
--- FAIL: TestExample (0.00s)
???:1: 1 is not equal to 2
FAIL
panic: exit status 1
goroutine 1 [running]:
github.com/goplus/llgo/internal/build.linkMainPkg(0x1400af224b0, 0x1400009dba0, {0x1400bf28008, 0x70, 0x102c05020?}, 0x140001f4360, 0x3, 0x0)
/Users/zhangzhiyang/Documents/Code/goplus/llgo/internal/build/build.go:515 +0x8d4
github.com/goplus/llgo/internal/build.Do({0x102ff8820, 0x0, 0x0}, 0x140001f4360)
/Users/zhangzhiyang/Documents/Code/goplus/llgo/internal/build/build.go:271 +0xee4
github.com/goplus/llgo/cmd/internal/test.runCmd(0x22?, {0x102ff8820?, 0x14000076ae8?, 0x1027ba4d4?})
/Users/zhangzhiyang/Documents/Code/goplus/llgo/cmd/internal/test/test.go:34 +0x8c
main.(*Cmd_test).Main.func1({0x102ff8820?, 0x1027ba4c4?, 0x14000206a00?})
cmd/llgo/test_cmd.gox:27 +0x40
main.(*Cmd_test).Main.(*Command).Run__1.func2(0x14000206a00?, {0x102ff8820?, 0x4?, 0x102a91864?})
/Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/xcmd/classfile.go:87 +0x34
github.com/goplus/cobra.(*Command).execute(0x1400021b508, {0x102ff8820, 0x0, 0x0})
/Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/command.go:1019 +0x810
github.com/goplus/cobra.(*Command).ExecuteC(0x1400021a008)
/Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/command.go:1148 +0x350
github.com/goplus/cobra.(*Command).Execute(...)
/Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/command.go:1071
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.
with test fail,expect exit with no zero exit code.
but got
after update