diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/tests/data.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py index 98e430ce2a..cbc7c1ecd4 100644 --- a/bitbake/lib/bb/tests/data.py +++ b/bitbake/lib/bb/tests/data.py | |||
@@ -395,6 +395,16 @@ class TestOverrides(unittest.TestCase): | |||
395 | self.d.setVar("OVERRIDES", "foo:bar:some_val") | 395 | self.d.setVar("OVERRIDES", "foo:bar:some_val") |
396 | self.assertEqual(self.d.getVar("TEST"), "testvalue3") | 396 | self.assertEqual(self.d.getVar("TEST"), "testvalue3") |
397 | 397 | ||
398 | # Test an override with _<numeric> in it based on a real world OE issue | ||
399 | def test_underscore_override_2(self): | ||
400 | self.d.setVar("TARGET_ARCH", "x86_64") | ||
401 | self.d.setVar("PN", "test-${TARGET_ARCH}") | ||
402 | self.d.setVar("VERSION", "1") | ||
403 | self.d.setVar("VERSION:pn-test-${TARGET_ARCH}", "2") | ||
404 | self.d.setVar("OVERRIDES", "pn-${PN}") | ||
405 | bb.data.expandKeys(self.d) | ||
406 | self.assertEqual(self.d.getVar("VERSION"), "2") | ||
407 | |||
398 | def test_remove_with_override(self): | 408 | def test_remove_with_override(self): |
399 | self.d.setVar("TEST:bar", "testvalue2") | 409 | self.d.setVar("TEST:bar", "testvalue2") |
400 | self.d.setVar("TEST:some_val", "testvalue3 testvalue5") | 410 | self.d.setVar("TEST:some_val", "testvalue3 testvalue5") |
@@ -416,16 +426,6 @@ class TestOverrides(unittest.TestCase): | |||
416 | self.d.setVar("TEST:bar:append", "testvalue2") | 426 | self.d.setVar("TEST:bar:append", "testvalue2") |
417 | self.assertEqual(self.d.getVar("TEST"), "testvalue2") | 427 | self.assertEqual(self.d.getVar("TEST"), "testvalue2") |
418 | 428 | ||
419 | # Test an override with _<numeric> in it based on a real world OE issue | ||
420 | def test_underscore_override(self): | ||
421 | self.d.setVar("TARGET_ARCH", "x86_64") | ||
422 | self.d.setVar("PN", "test-${TARGET_ARCH}") | ||
423 | self.d.setVar("VERSION", "1") | ||
424 | self.d.setVar("VERSION:pn-test-${TARGET_ARCH}", "2") | ||
425 | self.d.setVar("OVERRIDES", "pn-${PN}") | ||
426 | bb.data.expandKeys(self.d) | ||
427 | self.assertEqual(self.d.getVar("VERSION"), "2") | ||
428 | |||
429 | def test_append_and_unused_override(self): | 429 | def test_append_and_unused_override(self): |
430 | # Had a bug where an unused override append could return "" instead of None | 430 | # Had a bug where an unused override append could return "" instead of None |
431 | self.d.setVar("BAR:append:unusedoverride", "testvalue2") | 431 | self.d.setVar("BAR:append:unusedoverride", "testvalue2") |