diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-11-25 15:28:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-30 15:48:09 +0000 |
commit | 1fce7ecbbb004a5ad82da3eef79cfd52b276708d (patch) | |
tree | dc19c8ecb8e0b04ba5eafd27a7679bb55585a868 /bitbake/lib/bb/tests/codeparser.py | |
parent | 1d0c124cdf0282b8d139063409e40982f0ec9888 (diff) | |
download | poky-1fce7ecbbb004a5ad82da3eef79cfd52b276708d.tar.gz |
bitbake: bitbake: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/codeparser.py')
-rw-r--r-- | bitbake/lib/bb/tests/codeparser.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/tests/codeparser.py b/bitbake/lib/bb/tests/codeparser.py index b80c315d3d..a681841df3 100644 --- a/bitbake/lib/bb/tests/codeparser.py +++ b/bitbake/lib/bb/tests/codeparser.py | |||
@@ -68,7 +68,7 @@ class VariableReferenceTest(ReferenceTest): | |||
68 | 68 | ||
69 | def test_python_reference(self): | 69 | def test_python_reference(self): |
70 | self.setEmptyVars(["BAR"]) | 70 | self.setEmptyVars(["BAR"]) |
71 | self.parseExpression("${@d.getVar('BAR', True) + 'foo'}") | 71 | self.parseExpression("${@d.getVar('BAR') + 'foo'}") |
72 | self.assertReferences(set(["BAR"])) | 72 | self.assertReferences(set(["BAR"])) |
73 | 73 | ||
74 | class ShellReferenceTest(ReferenceTest): | 74 | class ShellReferenceTest(ReferenceTest): |
@@ -209,17 +209,17 @@ be. These unit tests are testing snippets.""" | |||
209 | return " " + value | 209 | return " " + value |
210 | 210 | ||
211 | def test_getvar_reference(self): | 211 | def test_getvar_reference(self): |
212 | self.parseExpression("d.getVar('foo', True)") | 212 | self.parseExpression("d.getVar('foo')") |
213 | self.assertReferences(set(["foo"])) | 213 | self.assertReferences(set(["foo"])) |
214 | self.assertExecs(set()) | 214 | self.assertExecs(set()) |
215 | 215 | ||
216 | def test_getvar_computed_reference(self): | 216 | def test_getvar_computed_reference(self): |
217 | self.parseExpression("d.getVar('f' + 'o' + 'o', True)") | 217 | self.parseExpression("d.getVar('f' + 'o' + 'o')") |
218 | self.assertReferences(set()) | 218 | self.assertReferences(set()) |
219 | self.assertExecs(set()) | 219 | self.assertExecs(set()) |
220 | 220 | ||
221 | def test_getvar_exec_reference(self): | 221 | def test_getvar_exec_reference(self): |
222 | self.parseExpression("eval('d.getVar(\"foo\", True)')") | 222 | self.parseExpression("eval('d.getVar(\"foo\")')") |
223 | self.assertReferences(set()) | 223 | self.assertReferences(set()) |
224 | self.assertExecs(set(["eval"])) | 224 | self.assertExecs(set(["eval"])) |
225 | 225 | ||
@@ -269,11 +269,11 @@ be. These unit tests are testing snippets.""" | |||
269 | class DependencyReferenceTest(ReferenceTest): | 269 | class DependencyReferenceTest(ReferenceTest): |
270 | 270 | ||
271 | pydata = """ | 271 | pydata = """ |
272 | d.getVar('somevar', True) | 272 | d.getVar('somevar') |
273 | def test(d): | 273 | def test(d): |
274 | foo = 'bar %s' % 'foo' | 274 | foo = 'bar %s' % 'foo' |
275 | def test2(d): | 275 | def test2(d): |
276 | d.getVar(foo, True) | 276 | d.getVar(foo) |
277 | d.getVar('bar', False) | 277 | d.getVar('bar', False) |
278 | test2(d) | 278 | test2(d) |
279 | 279 | ||