backport of commit d223d2117f

backport/acc_test_logic/wrongly-witty-moccasin
Lucas Bajolet 2 years ago
parent c03d001c49
commit 33170ebd85

@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"testing"
)
@ -21,6 +22,9 @@ func BuildTestPacker(t *testing.T) (string, error) {
packerCoreDir := filepath.Dir(testDir)
outBin := filepath.Join(os.TempDir(), fmt.Sprintf("packer_core-%d", rand.Int()))
if runtime.GOOS == "windows" {
outBin = fmt.Sprintf("%s.exe", outBin)
}
compileCommand := exec.Command("go", "build", "-C", packerCoreDir, "-o", outBin)
logs, err := compileCommand.CombinedOutput()

Loading…
Cancel
Save