Skip to content
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

test(gnovm): re-enable stdlibs tests #2110

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading