-
Notifications
You must be signed in to change notification settings - Fork 46
build:exit when test fail #1128
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -513,6 +513,7 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, conf *Co | |
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't call
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in #1129 |
||
| } | ||
| case ModeRun: | ||
| args := make([]string, 0, len(conf.RunArgs)+1) | ||
|
|
||
Oops, something went wrong.
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.
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.
check error result:
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.
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