mirror of
https://github.com/kopia/kopia.git
synced 2026-01-27 15:58:03 -05:00
Update the fio runner to use a docker image if the appropriate environment variable is set. Docker image is built via a makefile target and used in the robustness tool tests.
22 lines
349 B
Go
22 lines
349 B
Go
package fio
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
fioExe := os.Getenv(FioExeEnvKey)
|
|
fioImg := os.Getenv(FioDockerImageEnvKey)
|
|
|
|
if fioExe == "" && fioImg == "" {
|
|
fmt.Printf("Skipping fio tests if neither %s no %s is set\n", FioExeEnvKey, FioDockerImageEnvKey)
|
|
os.Exit(0)
|
|
}
|
|
|
|
result := m.Run()
|
|
|
|
os.Exit(result)
|
|
}
|