Skip to content

Commit

Permalink
correctly recognize running from root
Browse files Browse the repository at this point in the history
  • Loading branch information
xhd2015 committed Nov 23, 2024
1 parent 4123ef9 commit c56ce78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions cmd/xgo/test-explorer/run_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,22 @@ func (c *runSession) Start() error {

rootPath := c.path
if len(rootPath) == 0 {
if len(itemPaths) > 0 {
rootPath = itemPaths[0]
} else {
rootPath = pathPrefix
}
}

// the root path
if len(rootPath) == len(pathPrefix) {
// trigger clear coverage
if c.covController != nil {
err := c.covController.Clear()
if err != nil {
return fmt.Errorf("clear coverage: %w", err)
}
}
if len(itemPaths) > 0 {
rootPath = itemPaths[0]
} else {
rootPath = pathPrefix
}
}

plainMsgBuilder := func(line []byte) ([]*TestingItemEvent, error) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/xgo/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "fmt"
// VERSION is manually updated when needed a new tag
// see also runtime/core/version.go
const VERSION = "1.0.52"
const REVISION = "a6f0088f2e43fe837c905792459dfca4e1022a0b+1"
const NUMBER = 324
const REVISION = "4123ef9cd711daea863cd3cf319989a581debaad+1"
const NUMBER = 325

// the matching runtime/core's version
// manually updated
Expand Down

0 comments on commit c56ce78

Please sign in to comment.