(ctx context.Context, args ...string)
| 149 | } |
| 150 | |
| 151 | func commandWithContext(ctx context.Context, args ...string) *exec.Cmd { |
| 152 | cmd := exec.CommandContext(ctx, args[0], args[1:]...) //nolint:gosec |
| 153 | cmd.Stdout = os.Stdout |
| 154 | cmd.Stderr = os.Stderr |
| 155 | cmd.Env = os.Environ() |
| 156 | if *runCoverage { |
| 157 | cmd.Env = append(cmd.Env, "COVERAGE_OUTPUT=--test.coverprofile=coverage.out") |
| 158 | } |
| 159 | if runtime.GOARCH == "arm64" { |
| 160 | cmd.Env = append(cmd.Env, "MINIO_IMAGE_ARCH=RELEASE.2020-11-13T20-10-18Z-arm64") |
| 161 | cmd.Env = append(cmd.Env, "NFS_SERVER_IMAGE_ARCH=11-arm") |
| 162 | } |
| 163 | cmd.Env = append(cmd.Env, EnvForCompose()...) |
| 164 | |
| 165 | return cmd |
| 166 | } |
| 167 | |
| 168 | // command takes a list of args and executes them as a program. |
| 169 | // Example: |
no outgoing calls
no test coverage detected
searching dependent graphs…