diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/liboe.py')
| -rw-r--r-- | meta/lib/oeqa/selftest/liboe.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/liboe.py b/meta/lib/oeqa/selftest/liboe.py index cd12cd25b3..0b0301def6 100644 --- a/meta/lib/oeqa/selftest/liboe.py +++ b/meta/lib/oeqa/selftest/liboe.py | |||
| @@ -1,11 +1,16 @@ | |||
| 1 | from oeqa.selftest.base import oeSelfTest | 1 | from oeqa.selftest.base import oeSelfTest |
| 2 | from oeqa.utils.commands import get_bb_var, bitbake, runCmd | 2 | from oeqa.utils.commands import get_bb_var, get_bb_vars, bitbake, runCmd |
| 3 | import oe.path | 3 | import oe.path |
| 4 | import glob | 4 | import glob |
| 5 | import os | 5 | import os |
| 6 | import os.path | 6 | import os.path |
| 7 | 7 | ||
| 8 | class LibOE(oeSelfTest): | 8 | class LibOE(oeSelfTest): |
| 9 | |||
| 10 | @classmethod | ||
| 11 | def setUpClass(cls): | ||
| 12 | cls.tmp_dir = get_bb_var('TMPDIR') | ||
| 13 | |||
| 9 | def test_copy_tree_special(self): | 14 | def test_copy_tree_special(self): |
| 10 | """ | 15 | """ |
| 11 | Summary: oe.path.copytree() should copy files with special character | 16 | Summary: oe.path.copytree() should copy files with special character |
| @@ -14,8 +19,7 @@ class LibOE(oeSelfTest): | |||
| 14 | Product: OE-Core | 19 | Product: OE-Core |
| 15 | Author: Joshua Lock <joshua.g.lock@intel.com> | 20 | Author: Joshua Lock <joshua.g.lock@intel.com> |
| 16 | """ | 21 | """ |
| 17 | tmp_dir = get_bb_var('TMPDIR') | 22 | testloc = oe.path.join(self.tmp_dir, 'liboetests') |
| 18 | testloc = oe.path.join(tmp_dir, 'liboetests') | ||
| 19 | src = oe.path.join(testloc, 'src') | 23 | src = oe.path.join(testloc, 'src') |
| 20 | dst = oe.path.join(testloc, 'dst') | 24 | dst = oe.path.join(testloc, 'dst') |
| 21 | bb.utils.mkdirhier(testloc) | 25 | bb.utils.mkdirhier(testloc) |
| @@ -40,8 +44,7 @@ class LibOE(oeSelfTest): | |||
| 40 | Product: OE-Core | 44 | Product: OE-Core |
| 41 | Author: Joshua Lock <joshua.g.lock@intel.com> | 45 | Author: Joshua Lock <joshua.g.lock@intel.com> |
| 42 | """ | 46 | """ |
| 43 | tmp_dir = get_bb_var('TMPDIR') | 47 | testloc = oe.path.join(self.tmp_dir, 'liboetests') |
| 44 | testloc = oe.path.join(tmp_dir, 'liboetests') | ||
| 45 | src = oe.path.join(testloc, 'src') | 48 | src = oe.path.join(testloc, 'src') |
| 46 | dst = oe.path.join(testloc, 'dst') | 49 | dst = oe.path.join(testloc, 'dst') |
| 47 | bb.utils.mkdirhier(testloc) | 50 | bb.utils.mkdirhier(testloc) |
| @@ -51,8 +54,9 @@ class LibOE(oeSelfTest): | |||
| 51 | # ensure we have setfattr available | 54 | # ensure we have setfattr available |
| 52 | bitbake("attr-native") | 55 | bitbake("attr-native") |
| 53 | 56 | ||
| 54 | destdir = get_bb_var('SYSROOT_DESTDIR', 'attr-native') | 57 | bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'attr-native') |
| 55 | bindir = get_bb_var('bindir', 'attr-native') | 58 | destdir = bb_vars['SYSROOT_DESTDIR'] |
| 59 | bindir = bb_vars['bindir'] | ||
| 56 | bindir = destdir + bindir | 60 | bindir = destdir + bindir |
| 57 | 61 | ||
| 58 | # create a file with xattr and copy it | 62 | # create a file with xattr and copy it |
| @@ -73,8 +77,7 @@ class LibOE(oeSelfTest): | |||
| 73 | Product: OE-Core | 77 | Product: OE-Core |
| 74 | Author: Joshua Lock <joshua.g.lock@intel.com> | 78 | Author: Joshua Lock <joshua.g.lock@intel.com> |
| 75 | """ | 79 | """ |
| 76 | tmp_dir = get_bb_var('TMPDIR') | 80 | testloc = oe.path.join(self.tmp_dir, 'liboetests') |
| 77 | testloc = oe.path.join(tmp_dir, 'liboetests') | ||
| 78 | src = oe.path.join(testloc, 'src') | 81 | src = oe.path.join(testloc, 'src') |
| 79 | dst = oe.path.join(testloc, 'dst') | 82 | dst = oe.path.join(testloc, 'dst') |
| 80 | bb.utils.mkdirhier(testloc) | 83 | bb.utils.mkdirhier(testloc) |
