diff options
Diffstat (limited to 'pkg/machine/e2e/machine_test.go')
-rw-r--r-- | pkg/machine/e2e/machine_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/machine/e2e/machine_test.go b/pkg/machine/e2e/machine_test.go index 2b3b60b2b..657014b05 100644 --- a/pkg/machine/e2e/machine_test.go +++ b/pkg/machine/e2e/machine_test.go @@ -23,14 +23,20 @@ func TestMain(m *testing.M) { const ( defaultStream string = "podman-testing" - tmpDir string = "/var/tmp" ) var ( + tmpDir = "/var/tmp" fqImageName string suiteImageName string ) +func init() { + if value, ok := os.LookupEnv("TMPDIR"); ok { + tmpDir = value + } +} + // TestLibpod ginkgo master function func TestMachine(t *testing.T) { RegisterFailHandler(Fail) @@ -70,7 +76,8 @@ var _ = SynchronizedAfterSuite(func() {}, }) func setup() (string, *machineTestBuilder) { - homeDir, err := ioutil.TempDir("/var/tmp", "podman_test") + // Set TMPDIR if this needs a new directory + homeDir, err := ioutil.TempDir("", "podman_test") if err != nil { Fail(fmt.Sprintf("failed to create home directory: %q", err)) } |