| 344 | } |
| 345 | |
| 346 | func (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 | |
| 364 | func (z *ZTest) RunInternal(ctx context.Context) error { |
| 365 | if err := z.check(); err != nil { |