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

Method RunScript

ztest/ztest.go:346–362  ·  view source on GitHub ↗
(ctx context.Context, shellPath, testDir string, tempDir func() string)

Source from the content-addressed store, hash-verified

344}
345
346func (z *ZTest) RunScript(ctx context.Context, shellPath, testDir string, tempDir func() string) error {
347 if err := z.check(); err != nil {
348 return fmt.Errorf("bad yaml format: %w", err)
349 }
350 serr := runsh(ctx, shellPath, testDir, tempDir(), z)
351 if !z.Vector {
352 return serr
353 }
354 if serr != nil {
355 serr = fmt.Errorf("=== sequence ===\n%w", serr)
356 }
357 verr := runsh(ctx, shellPath, testDir, tempDir(), z, "SUPER_RUNTIME=vam")
358 if verr != nil {
359 verr = fmt.Errorf("=== vector ===\n%w", verr)
360 }
361 return errors.Join(serr, verr)
362}
363
364func (z *ZTest) RunInternal(ctx context.Context) error {
365 if err := z.check(); err != nil {

Callers 2

RunMethod · 0.95
TestRunScriptFunction · 0.80

Calls 2

checkMethod · 0.95
runshFunction · 0.85

Tested by 1

TestRunScriptFunction · 0.64