diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/oescripts.py')
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/oescripts.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py index bfbc33b08d..3f9899b289 100644 --- a/meta/lib/oeqa/selftest/cases/oescripts.py +++ b/meta/lib/oeqa/selftest/cases/oescripts.py | |||
| @@ -9,33 +9,9 @@ import shutil | |||
| 9 | import importlib | 9 | import importlib |
| 10 | import unittest | 10 | import unittest |
| 11 | from oeqa.selftest.case import OESelftestTestCase | 11 | from oeqa.selftest.case import OESelftestTestCase |
| 12 | from oeqa.selftest.cases.buildhistory import BuildhistoryBase | ||
| 13 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | 12 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var |
| 14 | from oeqa.utils import CommandError | 13 | from oeqa.utils import CommandError |
| 15 | 14 | ||
| 16 | class BuildhistoryDiffTests(BuildhistoryBase): | ||
| 17 | |||
| 18 | def test_buildhistory_diff(self): | ||
| 19 | target = 'xcursor-transparent-theme' | ||
| 20 | self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True) | ||
| 21 | self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True) | ||
| 22 | result = runCmd("oe-pkgdata-util read-value PKGV %s" % target) | ||
| 23 | pkgv = result.output.rstrip() | ||
| 24 | result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR')) | ||
| 25 | expected_endlines = [ | ||
| 26 | "xcursor-transparent-theme-dev: RRECOMMENDS: removed \"xcursor-transparent-theme (['= %s-r1'])\", added \"xcursor-transparent-theme (['= %s-r0'])\"" % (pkgv, pkgv), | ||
| 27 | "xcursor-transparent-theme-staticdev: RDEPENDS: removed \"xcursor-transparent-theme-dev (['= %s-r1'])\", added \"xcursor-transparent-theme-dev (['= %s-r0'])\"" % (pkgv, pkgv) | ||
| 28 | ] | ||
| 29 | for line in result.output.splitlines(): | ||
| 30 | for el in expected_endlines: | ||
| 31 | if line.endswith(el): | ||
| 32 | expected_endlines.remove(el) | ||
| 33 | break | ||
| 34 | else: | ||
| 35 | self.fail('Unexpected line:\n%s\nExpected line endings:\n %s' % (line, '\n '.join(expected_endlines))) | ||
| 36 | if expected_endlines: | ||
| 37 | self.fail('Missing expected line endings:\n %s' % '\n '.join(expected_endlines)) | ||
| 38 | |||
| 39 | @unittest.skipUnless(importlib.util.find_spec("cairo"), "Python cairo module is not present") | 15 | @unittest.skipUnless(importlib.util.find_spec("cairo"), "Python cairo module is not present") |
| 40 | class OEPybootchartguyTests(OESelftestTestCase): | 16 | class OEPybootchartguyTests(OESelftestTestCase): |
| 41 | 17 | ||
