diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/poky/meta/lib/oeqa/selftest/cases/oescripts.py | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/poky/meta/lib/oeqa/selftest/cases/oescripts.py')
-rw-r--r-- | external/poky/meta/lib/oeqa/selftest/cases/oescripts.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/external/poky/meta/lib/oeqa/selftest/cases/oescripts.py b/external/poky/meta/lib/oeqa/selftest/cases/oescripts.py new file mode 100644 index 00000000..bcdc2d5a --- /dev/null +++ b/external/poky/meta/lib/oeqa/selftest/cases/oescripts.py @@ -0,0 +1,28 @@ +from oeqa.selftest.case import OESelftestTestCase +from oeqa.selftest.cases.buildhistory import BuildhistoryBase +from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer +from oeqa.core.decorator.oeid import OETestID + +class BuildhistoryDiffTests(BuildhistoryBase): + + @OETestID(295) + def test_buildhistory_diff(self): + target = 'xcursor-transparent-theme' + self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True) + self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True) + result = runCmd("oe-pkgdata-util read-value PKGV %s" % target) + pkgv = result.output.rstrip() + result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR')) + expected_endlines = [ + "xcursor-transparent-theme-dev: RDEPENDS: removed \"xcursor-transparent-theme (['= %s-r1'])\", added \"xcursor-transparent-theme (['= %s-r0'])\"" % (pkgv, pkgv), + "xcursor-transparent-theme-staticdev: RDEPENDS: removed \"xcursor-transparent-theme-dev (['= %s-r1'])\", added \"xcursor-transparent-theme-dev (['= %s-r0'])\"" % (pkgv, pkgv) + ] + for line in result.output.splitlines(): + for el in expected_endlines: + if line.endswith(el): + expected_endlines.remove(el) + break + else: + self.fail('Unexpected line:\n%s\nExpected line endings:\n %s' % (line, '\n '.join(expected_endlines))) + if expected_endlines: + self.fail('Missing expected line endings:\n %s' % '\n '.join(expected_endlines)) |