summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/tests/parse.py')
-rw-r--r--bitbake/lib/bb/tests/parse.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index ab6ca90317..8f16ba4f4c 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -83,7 +83,28 @@ unset B[flag]
83 self.assertEqual(d.getVar("A"), None) 83 self.assertEqual(d.getVar("A"), None)
84 self.assertEqual(d.getVarFlag("A","flag"), None) 84 self.assertEqual(d.getVarFlag("A","flag"), None)
85 self.assertEqual(d.getVar("B"), "2") 85 self.assertEqual(d.getVar("B"), "2")
86 86
87 exporttest = """
88A = "a"
89export B = "b"
90export C
91exportD = "d"
92"""
93
94 def test_parse_exports(self):
95 f = self.parsehelper(self.exporttest)
96 d = bb.parse.handle(f.name, self.d)['']
97 self.assertEqual(d.getVar("A"), "a")
98 self.assertIsNone(d.getVarFlag("A", "export"))
99 self.assertEqual(d.getVar("B"), "b")
100 self.assertEqual(d.getVarFlag("B", "export"), 1)
101 self.assertIsNone(d.getVar("C"))
102 self.assertEqual(d.getVarFlag("C", "export"), 1)
103 self.assertIsNone(d.getVar("D"))
104 self.assertIsNone(d.getVarFlag("D", "export"))
105 self.assertEqual(d.getVar("exportD"), "d")
106 self.assertIsNone(d.getVarFlag("exportD", "export"))
107
87 108
88 overridetest = """ 109 overridetest = """
89RRECOMMENDS_${PN} = "a" 110RRECOMMENDS_${PN} = "a"