MCPcopy Create free account
hub / github.com/brimdata/super / Run

Function Run

ztest/ztest.go:188–207  ·  view source on GitHub ↗

Run runs the ztests in the directory named dirname. For each file f.yaml in the directory, Run calls FromYAMLFile to load a ztest and then runs it in subtest named f. path is a command search path like the PATH environment variable.

(t *testing.T, dirname string)

Source from the content-addressed store, hash-verified

186// subtest named f. path is a command search path like the
187// PATH environment variable.
188func Run(t *testing.T, dirname string) {
189 shellPath := ShellPath()
190 bundles, err := Load(dirname)
191 if err != nil {
192 t.Fatal(err)
193 }
194 for _, b := range bundles {
195 name := filepath.Base(b.FileName)
196 if z := b.Test; z != nil {
197 name = fmt.Sprintf("%s/%d", name, z.Line)
198 }
199 t.Run(name, func(t *testing.T) {
200 t.Parallel()
201 if b.Error != nil {
202 t.Fatalf("%s: %s", b.FileName, b.Error)
203 }
204 b.Test.Run(t, shellPath, b.FileName)
205 })
206 }
207}
208
209type File struct {
210 // Name is the name of the file with respect to the directoy in which

Callers 2

TestSPQFunction · 0.92
TestAggregateZtestsSpillFunction · 0.92

Calls 3

ShellPathFunction · 0.85
LoadFunction · 0.70
RunMethod · 0.65

Tested by 2

TestSPQFunction · 0.74
TestAggregateZtestsSpillFunction · 0.74