pokybleeding.py 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Copyright OpenEmbedded Contributors
  3. #
  4. # SPDX-License-Identifier: MIT
  5. #
  6. from oeqa.utils.commands import bitbake, get_bb_var
  7. from oeqa.selftest.case import OESelftestTestCase
  8. class PokyBleeding(OESelftestTestCase):
  9. def test_poky_bleeding_autorev(self):
  10. """
  11. Test that poky-bleeding.bbclass sets SRCREV to "AUTOINC" for recipe
  12. with a single scm in SRC_URI and for recipe with two scm's in SRC_URI.
  13. """
  14. self.assertNotEqual( get_bb_var('SRCREV', 'mtd-utils-selftest'), "AUTOINC")
  15. self.assertNotEqual( get_bb_var('SRCREV', 'hello-rs'), "AUTOINC")
  16. self.assertNotEqual( get_bb_var('SRCREV_hello-lib', 'hello-rs'), "AUTOINC")
  17. features = '''
  18. INHERIT += "poky-bleeding"
  19. POKY_AUTOREV_RECIPES = "hello-rs mtd-utils-selftest"
  20. '''
  21. self.write_config(features)
  22. self.assertEqual( get_bb_var('SRCREV', 'mtd-utils-selftest'), "AUTOINC")
  23. self.assertEqual( get_bb_var('SRCREV', 'hello-rs'), "AUTOINC")
  24. self.assertEqual( get_bb_var('SRCREV_hello-lib', 'hello-rs'), "AUTOINC")