Skip to content

Commit

Permalink
resolved conflict with debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaau committed Feb 21, 2025
1 parent f716fd4 commit c15d1f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 5 additions & 7 deletions gnovm/cmd/gno/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ type testCfg struct {
printRuntimeMetrics bool
printEvents bool

fuzzName string
fuzzIters int
debug bool
debugAddr string
fuzzName string
fuzzIters int
debug bool
debugAddr string
}

func newTestCmd(io commands.IO) *commands.Command {
Expand Down Expand Up @@ -159,8 +159,7 @@ func (c *testCfg) RegisterFlags(fs *flag.FlagSet) {
&c.fuzzIters,
"i",
50000,
"number of fuzz iterations to run",

"number of fuzz iterations to run")

fs.BoolVar(
&c.debug,
Expand Down Expand Up @@ -230,7 +229,6 @@ func execTest(cfg *testCfg, args []string, io commands.IO) error {

opts.Debug = cfg.debug


buildErrCount := 0
testErrCount := 0
for _, pkg := range subPkgs {
Expand Down
5 changes: 1 addition & 4 deletions gnovm/pkg/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ func (opts *TestOptions) runTestFiles(
testingtv := gno.TypedValue{T: &gno.PackageType{}, V: testingpv}
testingcx := &gno.ConstExpr{TypedValue: testingtv}


calledFunction := gno.Sel(testingcx, fmt.Sprintf("Run%s", testOrFuzz)) // Call testing.RunTest or testing.RunFuzz
var params []interface{}
if testOrFuzz == "Fuzz" {
Expand All @@ -345,7 +344,7 @@ func (opts *TestOptions) runTestFiles(
Type: gno.Sel(testingcx, fmt.Sprintf("Internal%s", testOrFuzz)),
Elts: gno.KeyValueExprs{
{Key: gno.X("Name"), Value: gno.Str(tf.Name)},
{Key: gno.X("F"), Value: gno.Nx(tf.Name)},},
{Key: gno.X("F"), Value: gno.Nx(tf.Name)}},
})

if opts.Debug {
Expand All @@ -365,8 +364,6 @@ func (opts *TestOptions) runTestFiles(
m.Debugger.Enable(os.Stdin, os.Stdout, fileContent)
}



eval := m.Eval(gno.Call(
calledFunction,
params...,
Expand Down

0 comments on commit c15d1f7

Please sign in to comment.