summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/bblayers.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/bblayers.py')
-rw-r--r--meta/lib/oeqa/selftest/bblayers.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/bblayers.py b/meta/lib/oeqa/selftest/bblayers.py
new file mode 100644
index 0000000..52aa4f8
--- /dev/null
+++ b/meta/lib/oeqa/selftest/bblayers.py
@@ -0,0 +1,37 @@
1import unittest
2import os
3import logging
4import re
5import shutil
6
7import oeqa.utils.ftools as ftools
8from oeqa.selftest.base import oeSelfTest
9from oeqa.utils.commands import runCmd
10
11class BitbakeLayers(oeSelfTest):
12
13 def test_bitbakelayers_showcrossdepends(self):
14 result = runCmd('bitbake-layers show-cross-depends')
15 self.assertTrue('aspell' in result.output)
16
17 def test_bitbakelayers_showlayers(self):
18 result = runCmd('bitbake-layers show_layers')
19 self.assertTrue('meta-selftest' in result.output)
20
21 def test_bitbakelayers_showappends(self):
22 result = runCmd('bitbake-layers show_appends')
23 self.assertTrue('xcursor-transparent-theme_0.1.1.bbappend' in result.output, msg='xcursor-transparent-theme_0.1.1.bbappend file was not recognised')
24
25 def test_bitbakelayers_showoverlayed(self):
26 result = runCmd('bitbake-layers show_overlayed')
27 self.assertTrue('aspell' in result.output, msg='xcursor-transparent-theme_0.1.1.bbappend file was not recognised')
28
29 def test_bitbakelayers_flatten(self):
30 self.assertFalse(os.path.isdir(os.path.join(self.builddir, 'test')))
31 result = runCmd('bitbake-layers flatten test')
32 bb_file = os.path.join(self.builddir, 'test/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bb')
33 self.assertTrue(os.path.isfile(bb_file))
34 contents = ftools.read_file(bb_file)
35 find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
36 shutil.rmtree(os.path.join(self.builddir, 'test'))
37 self.assertTrue(find_in_contents)