Skip to content

Commit

Permalink
Test commit
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Sep 11, 2023
1 parent e334ba1 commit 2a19b15
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gnovm/cmd/gno/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (c *modDownloadCfg) RegisterFlags(fs *flag.FlagSet) {
fs.StringVar(
&c.remote,
"remote",
"test3.gno.land:36657",
"localhost:26657",
"remote for fetching gno modules",
)

Expand Down
19 changes: 13 additions & 6 deletions gnovm/cmd/gno/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/gnolang/gno/gnovm/pkg/gnomod"
"github.com/gnolang/gno/gnovm/tests"
"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/gnolang/gno/tm2/pkg/crypto/keys/client"
"github.com/gnolang/gno/tm2/pkg/errors"
"github.com/gnolang/gno/tm2/pkg/random"
"github.com/gnolang/gno/tm2/pkg/std"
Expand Down Expand Up @@ -164,11 +165,12 @@ func execTest(cfg *testCfg, args []string, io *commands.IO) error {

verbose := cfg.verbose

tempdirRoot, err := os.MkdirTemp("", "gno-precompile")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(tempdirRoot)
tempdirRoot := "/Users/harry/Desktop/work/gno/temp"
// tempdirRoot, err := os.MkdirTemp("", "gno-precompile")
// if err != nil {
// log.Fatal(err)
// }
// defer os.RemoveAll(tempdirRoot)

// guess opts.RootDir
if cfg.rootDir == "" {
Expand Down Expand Up @@ -239,10 +241,15 @@ func execTest(cfg *testCfg, args []string, io *commands.IO) error {
}
// fetch dependencies
// TODO: remote should be configurable
if err := gnoMod.FetchDeps(gnomod.GetGnoModPath(), "staging.gno.land:36657", false); err != nil {
if err := gnoMod.FetchDeps(gnomod.GetGnoModPath(), "localhost:26657", verbose); err != nil {
return fmt.Errorf("fetch: %w", err)
}

err = copyDir(gnoModDir, filepath.Join(client.HomeDir(), "pkg", "mod", gnoMod.Module.Mod.Path))
if err != nil {
return fmt.Errorf("copy: %w", err)
}

if cfg.precompile {
if verbose {
io.ErrPrintfln("=== PREC %s", pkg.Dir)
Expand Down

0 comments on commit 2a19b15

Please sign in to comment.