diff options
author | Richard Haar <rh@richhaar.com> | 2023-11-30 22:51:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-02 18:04:23 +0000 |
commit | 64725a9c324d709e633ad31a79266a62a6d10f34 (patch) | |
tree | c99d47c6320eb24e02898f8608c7b33393160cff /bitbake/lib/bb/tests | |
parent | 6b6374c336016ee56ff7418c45d1eba2eac95b21 (diff) | |
download | poky-64725a9c324d709e633ad31a79266a62a6d10f34.tar.gz |
bitbake: bitbake: tests: Fix duplicate test_underscore_override test
Found a duplicate test, added _2 suffix to one, 74 tests now pass up from 73.
(Bitbake rev: ae2a19dadb4f3065b8731a61f45f29e6a70af402)
Signed-off-by: Richard Haar <rh@richhaar.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests')
-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") |