diff mbox series

bitbake: tests: Fix duplicate test_underscore_override test

Message ID 20231130225146.27235-1-rh@richhaar.com
State Accepted, archived
Commit ae2a19dadb4f3065b8731a61f45f29e6a70af402
Headers show
Series bitbake: tests: Fix duplicate test_underscore_override test | expand

Commit Message

Richard Haar Nov. 30, 2023, 10:51 p.m. UTC
Found a duplicate test, added  _2 suffix to one, 74 tests now pass up from 73.

Signed-off-by: Richard Haar <rh@richhaar.com>
---
 lib/bb/tests/data.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py
index 98e430ce..cbc7c1ec 100644
--- a/lib/bb/tests/data.py
+++ b/lib/bb/tests/data.py
@@ -395,6 +395,16 @@  class TestOverrides(unittest.TestCase):
         self.d.setVar("OVERRIDES", "foo:bar:some_val")
         self.assertEqual(self.d.getVar("TEST"), "testvalue3")
 
+    # Test an override with _<numeric> in it based on a real world OE issue
+    def test_underscore_override_2(self):
+        self.d.setVar("TARGET_ARCH", "x86_64")
+        self.d.setVar("PN", "test-${TARGET_ARCH}")
+        self.d.setVar("VERSION", "1")
+        self.d.setVar("VERSION:pn-test-${TARGET_ARCH}", "2")
+        self.d.setVar("OVERRIDES", "pn-${PN}")
+        bb.data.expandKeys(self.d)
+        self.assertEqual(self.d.getVar("VERSION"), "2")
+
     def test_remove_with_override(self):
         self.d.setVar("TEST:bar", "testvalue2")
         self.d.setVar("TEST:some_val", "testvalue3 testvalue5")
@@ -416,16 +426,6 @@  class TestOverrides(unittest.TestCase):
         self.d.setVar("TEST:bar:append", "testvalue2")
         self.assertEqual(self.d.getVar("TEST"), "testvalue2")
 
-    # Test an override with _<numeric> in it based on a real world OE issue
-    def test_underscore_override(self):
-        self.d.setVar("TARGET_ARCH", "x86_64")
-        self.d.setVar("PN", "test-${TARGET_ARCH}")
-        self.d.setVar("VERSION", "1")
-        self.d.setVar("VERSION:pn-test-${TARGET_ARCH}", "2")
-        self.d.setVar("OVERRIDES", "pn-${PN}")
-        bb.data.expandKeys(self.d)
-        self.assertEqual(self.d.getVar("VERSION"), "2")
-
     def test_append_and_unused_override(self):
         # Had a bug where an unused override append could return "" instead of None
         self.d.setVar("BAR:append:unusedoverride", "testvalue2")