From 95ccfc11cd63959d46835ecd17bef49c5761d91a Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:58:47 +0100 Subject: [PATCH] chore: add help testing Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- gno.land/pkg/integration/testscript_gnoland.go | 6 ++++++ gno.land/pkg/integration/testscript_utils.go | 1 + 2 files changed, 7 insertions(+) diff --git a/gno.land/pkg/integration/testscript_gnoland.go b/gno.land/pkg/integration/testscript_gnoland.go index 973df555bc9..2cdbe70223c 100644 --- a/gno.land/pkg/integration/testscript_gnoland.go +++ b/gno.land/pkg/integration/testscript_gnoland.go @@ -48,6 +48,8 @@ type testNode struct { } func SetupGnolandTestscript(t *testing.T, p *testscript.Params) error { + t.Helper() + tmpdir := t.TempDir() gnoRootDir := gnoenv.RootDir() @@ -149,6 +151,8 @@ func SetupGnolandTestscript(t *testing.T, p *testscript.Params) error { } func gnolandCmd(t *testing.T, nodes map[string]*testNode, gnolandBin, gnoRootDir, gnoHomeDir string) func(ts *testscript.TestScript, neg bool, args []string) { + t.Helper() + return func(ts *testscript.TestScript, neg bool, args []string) { logger := ts.Value(envKeyLogger).(*slog.Logger) sid := getNodeSID(ts) @@ -540,6 +544,8 @@ func getTestingLogger(env *testscript.Env, logname string) (*slog.Logger, error) } func buildGnoland(t *testing.T, gnoroot, output string) error { + t.Helper() + t.Log("building gnoland binary...") if _, err := os.Stat(output); err != nil { if !errors.Is(err, os.ErrNotExist) { diff --git a/gno.land/pkg/integration/testscript_utils.go b/gno.land/pkg/integration/testscript_utils.go index 6e4c5eafaef..a93f066eb3a 100644 --- a/gno.land/pkg/integration/testscript_utils.go +++ b/gno.land/pkg/integration/testscript_utils.go @@ -28,5 +28,6 @@ func (t tSeqShim) Verbose() bool { // // Refer to package documentation in doc.go for more information on commands and example txtar scripts. func RunSeqShimTestscripts(t *testing.T, p testscript.Params) { + t.Helper() testscript.RunT(tSeqShim{t}, p) }