]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
tests: add tests for OE pre-release version formatting
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 10 Feb 2015 18:13:24 +0000 (18:13 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Feb 2015 09:10:30 +0000 (09:10 +0000)
This scheme is used for versioning recipes that are pre-release (alpha,
beta, etc.) within OpenEmbedded, so add some tests to ensure the
appropriate comparison results still hold true.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/tests/utils.py

index 7c50b1d78678445152a0689ba1b5a4edf5366694..cf145f0d7a1808da4b1ebeed23290db1d4d657e8 100644 (file)
@@ -35,6 +35,10 @@ class VerCmpString(unittest.TestCase):
         self.assertTrue(result < 0)
         result = bb.utils.vercmp_string('1.1', '1_p2')
         self.assertTrue(result < 0)
+        result = bb.utils.vercmp_string('1.0', '1.0+1.1-beta1')
+        self.assertTrue(result < 0)
+        result = bb.utils.vercmp_string('1.1', '1.0+1.1-beta1')
+        self.assertTrue(result > 0)
 
     def test_explode_dep_versions(self):
         correctresult = {"foo" : ["= 1.10"]}