aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tests/codeparser.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-11-25 15:28:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:47:45 +0000
commit3b45c479de8640f92dd1d9f147b02e1eecfaadc8 (patch)
treeba0d71bdd8028442fd06002dc09e66ddf8291f6d /lib/bb/tests/codeparser.py
parent3cb0d1c78b4c2e4f251a59b86c8da583828ad08b (diff)
downloadbitbake-3b45c479de8640f92dd1d9f147b02e1eecfaadc8.tar.gz
bitbake-3b45c479de8640f92dd1d9f147b02e1eecfaadc8.tar.bz2
bitbake-3b45c479de8640f92dd1d9f147b02e1eecfaadc8.zip
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\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/codeparser.py')
-rw-r--r--lib/bb/tests/codeparser.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bb/tests/codeparser.py b/lib/bb/tests/codeparser.py
index b80c315d..a681841d 100644
--- a/lib/bb/tests/codeparser.py
+++ b/lib/bb/tests/codeparser.py
@@ -68,7 +68,7 @@ class VariableReferenceTest(ReferenceTest):
def test_python_reference(self):
self.setEmptyVars(["BAR"])
- self.parseExpression("${@d.getVar('BAR', True) + 'foo'}")
+ self.parseExpression("${@d.getVar('BAR') + 'foo'}")
self.assertReferences(set(["BAR"]))
class ShellReferenceTest(ReferenceTest):
@@ -209,17 +209,17 @@ be. These unit tests are testing snippets."""
return " " + value
def test_getvar_reference(self):
- self.parseExpression("d.getVar('foo', True)")
+ self.parseExpression("d.getVar('foo')")
self.assertReferences(set(["foo"]))
self.assertExecs(set())
def test_getvar_computed_reference(self):
- self.parseExpression("d.getVar('f' + 'o' + 'o', True)")
+ self.parseExpression("d.getVar('f' + 'o' + 'o')")
self.assertReferences(set())
self.assertExecs(set())
def test_getvar_exec_reference(self):
- self.parseExpression("eval('d.getVar(\"foo\", True)')")
+ self.parseExpression("eval('d.getVar(\"foo\")')")
self.assertReferences(set())
self.assertExecs(set(["eval"]))
@@ -269,11 +269,11 @@ be. These unit tests are testing snippets."""
class DependencyReferenceTest(ReferenceTest):
pydata = """
-d.getVar('somevar', True)
+d.getVar('somevar')
def test(d):
foo = 'bar %s' % 'foo'
def test2(d):
- d.getVar(foo, True)
+ d.getVar(foo)
d.getVar('bar', False)
test2(d)