Merge pull request #6106 from dolthub/pavel/batsee-output-dir

This commit is contained in:
Pavel Safronov
2023-06-13 06:20:34 -10:00
committed by GitHub
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -14,3 +14,4 @@ SysbenchDockerfile
SysbenchDockerfile.dockerignore
sysbench-runner-tests-entrypoint.sh
config.json
integration-tests/bats/batsee_results
+11
View File
@@ -313,6 +313,17 @@ func runBats(path string, resultChan chan<- batsResult, ctx context.Context, cfg
return
}
// ensure cfg.output exists, and create it if it doesn't
if _, err := os.Stat(cfg.output); os.IsNotExist(err) {
err = os.Mkdir(cfg.output, 0755)
if err != nil {
cli.Println("Error creating output directory:", err.Error())
result.err = err
resultChan <- result
return
}
}
startTime := time.Now()
outPath := fmt.Sprintf("%s/%s.stdout.log", cfg.output, path)