diff options
-rw-r--r-- | meta/lib/oeqa/utils/buildproject.py | 3 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/targetbuild.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py index 7e9b84955f..01a803ab61 100644 --- a/meta/lib/oeqa/utils/buildproject.py +++ b/meta/lib/oeqa/utils/buildproject.py | |||
@@ -17,7 +17,8 @@ class BuildProject(metaclass=ABCMeta): | |||
17 | self.uri = uri | 17 | self.uri = uri |
18 | self.archive = os.path.basename(uri) | 18 | self.archive = os.path.basename(uri) |
19 | if not tmpdir: | 19 | if not tmpdir: |
20 | tmpdir = tempfile.mkdtemp(prefix='buildproject') | 20 | self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-') |
21 | tmpdir = self.tempdirobj.name | ||
21 | self.localarchive = os.path.join(tmpdir, self.archive) | 22 | self.localarchive = os.path.join(tmpdir, self.archive) |
22 | self.dl_dir = dl_dir | 23 | self.dl_dir = dl_dir |
23 | if foldername: | 24 | if foldername: |
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py index 1202d579fb..b8db7b2aca 100644 --- a/meta/lib/oeqa/utils/targetbuild.py +++ b/meta/lib/oeqa/utils/targetbuild.py | |||
@@ -20,8 +20,9 @@ class BuildProject(metaclass=ABCMeta): | |||
20 | if not tmpdir: | 20 | if not tmpdir: |
21 | tmpdir = self.d.getVar('WORKDIR') | 21 | tmpdir = self.d.getVar('WORKDIR') |
22 | if not tmpdir: | 22 | if not tmpdir: |
23 | tmpdir = tempfile.mkdtemp(prefix='buildproject') | 23 | self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-') |
24 | self.localarchive = os.path.join(tmpdir,self.archive) | 24 | tmpdir = self.tempdirobj.name |
25 | self.localarchive = os.path.join(tmpdir, self.archive) | ||
25 | if foldername: | 26 | if foldername: |
26 | self.fname = foldername | 27 | self.fname = foldername |
27 | else: | 28 | else: |