Skip to content

Commit

Permalink
test(gnovm): re-enable stdlibs tests (gnolang#2110)
Browse files Browse the repository at this point in the history
cc/ @ajnavarro, related to gnolang#2040
  • Loading branch information
thehowl authored and omarsy committed Jun 3, 2024
1 parent 45c0b04 commit 5ce53ca
Showing 1 changed file with 5 additions and 107 deletions.
112 changes: 5 additions & 107 deletions gnovm/tests/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"log"
"os"
"path/filepath"
"sort"
"strings"
"testing"

Expand All @@ -16,11 +15,14 @@ import (
gno "github.com/gnolang/gno/gnovm/pkg/gnolang"
)

func TestPackages(t *testing.T) {
func TestStdlibs(t *testing.T) {
// NOTE: this test only works using _test.gno files;
// filetests are not meant to be used for testing standard libraries.
// The examples directory is tested directly using `gno test`.

// find all packages with *_test.gno files.
rootDirs := []string{
filepath.Join("..", "stdlibs"),
filepath.Join("..", "..", "examples"),
}
testDirs := map[string]string{} // aggregate here, pkgPath -> dir
pkgPaths := []string{}
Expand All @@ -45,114 +47,10 @@ func TestPackages(t *testing.T) {
return nil
})
}
// Sort pkgPaths for determinism.
sort.Strings(pkgPaths)
// For each package with testfiles (in testDirs), call Machine.TestMemPackage.
for _, pkgPath := range pkgPaths {
testDir := testDirs[pkgPath]
t.Run(pkgPath, func(t *testing.T) {
t.Skip("almost any new package is failing. Ignoring this test for now until we find a solution for this.")

if pkgPath == "gno.land/p/demo/avl" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/flow" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/grc/exts/vault" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/grc/grc1155" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/grc/grc20" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/grc/grc721" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/memeland" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/ownable" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/pausable" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/rand" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/tests" {
t.Skip("package failing")
}

if pkgPath == "gno.land/p/demo/todolist" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/art/gnoface" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/foo1155" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/foo20" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/keystore" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/microblog" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/tests" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/todolist" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/demo/userbook" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/gnoland/blog" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/gnoland/faucet" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/x/manfred_outfmt" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/x/nir1218_evaluation_proposal" {
t.Skip("package failing")
}

if pkgPath == "gno.land/r/gnoland/ghverify" {
t.Skip("package failing")
}

runPackageTest(t, testDir, pkgPath)
})
}
Expand Down

0 comments on commit 5ce53ca

Please sign in to comment.