From 081c280a4a4127f58bb96ce9fb601524b29626a5 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 15 Jul 2026 10:28:05 +0200 Subject: [PATCH] Print subfolder names --- driver/norma/run.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/driver/norma/run.go b/driver/norma/run.go index e76dd20d..b21dc977 100644 --- a/driver/norma/run.go +++ b/driver/norma/run.go @@ -98,10 +98,24 @@ func run(ctx *cli.Context) (err error) { if err != nil { return fmt.Errorf("failed to collect scenario files: %w", err) } + + // When the argument is a directory, scenarios are collected recursively + // from its subfolders. Print the folder name whenever execution moves + // into a new subfolder so the output is easy to follow. + info, statErr := os.Stat(path) + printFolders := statErr == nil && info.IsDir() + lastFolder := "" + for _, file := range files { if ctx.Err() != nil { return ctx.Err() } + if printFolders { + if folder := filepath.Dir(file); folder != lastFolder { + lastFolder = folder + fmt.Printf("=== scenarios in %s ===\n", folder) + } + } label := ctx.String(evalLabel.Name) if label == "" { label = fmt.Sprintf("eval_%d", time.Now().Unix())