summaryrefslogtreecommitdiffstats
path: root/scripts/lib/compatlayer/cases/bsp.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/compatlayer/cases/bsp.py')
-rw-r--r--scripts/lib/compatlayer/cases/bsp.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/lib/compatlayer/cases/bsp.py b/scripts/lib/compatlayer/cases/bsp.py
new file mode 100644
index 0000000000..5d9bf93e4a
--- /dev/null
+++ b/scripts/lib/compatlayer/cases/bsp.py
@@ -0,0 +1,26 @@
1# Copyright (C) 2017 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4import unittest
5
6from compatlayer import LayerType
7from compatlayer.case import OECompatLayerTestCase
8
9class BSPCompatLayer(OECompatLayerTestCase):
10 @classmethod
11 def setUpClass(self):
12 if self.tc.layer['type'] != LayerType.BSP:
13 raise unittest.SkipTest("BSPCompatLayer: Layer %s isn't BSP one." %\
14 self.tc.layer['name'])
15
16 def test_bsp_defines_machines(self):
17 self.assertTrue(self.tc.layer['conf']['machines'],
18 "Layer is BSP but doesn't defines machines.")
19
20 def test_bsp_no_set_machine(self):
21 from oeqa.utils.commands import get_bb_var
22
23 machine = get_bb_var('MACHINE')
24 self.assertEqual(self.td['bbvars']['MACHINE'], machine,
25 msg="Layer %s modified machine %s -> %s" % \
26 (self.tc.layer['name'], self.td['bbvars']['MACHINE'], machine))