summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/liboe.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/liboe.py b/meta/lib/oeqa/selftest/liboe.py
new file mode 100644
index 0000000000..454b92a3b7
--- /dev/null
+++ b/meta/lib/oeqa/selftest/liboe.py
@@ -0,0 +1,33 @@
1from oeqa.selftest.base import oeSelfTest
2from oeqa.utils.commands import get_bb_var
3import oe.path
4import glob
5import os
6import os.path
7
8class LibOE(oeSelfTest):
9 def test_copy_tree_special(self):
10 """
11 Summary: oe.path.copytree() should copy files with special character
12 Expected: 'test file with sp£c!al @nd spaces' should exist in
13 copy destination
14 Product: OE-Core
15 Author: Joshua Lock <joshua.g.lock@intel.com>
16 """
17 tmp_dir = get_bb_var('TMPDIR')
18 testloc = oe.path.join(tmp_dir, 'liboetests')
19 src = oe.path.join(testloc, 'src')
20 dst = oe.path.join(testloc, 'dst')
21 bb.utils.mkdirhier(testloc)
22 bb.utils.mkdirhier(src)
23 testfilename = 'test file with sp£c!al @nd spaces'
24
25 # create the test file and copy it
26 open(oe.path.join(src, testfilename), 'w+b').close()
27 oe.path.copytree(src, dst)
28
29 # ensure path exists in dest
30 fileindst = os.path.isfile(oe.path.join(dst, testfilename))
31 self.assertTrue(fileindst, "File with spaces doesn't exist in dst")
32
33 oe.path.remove(testloc)