oescripts.py 873 B

123456789101112131415
  1. from oeqa.selftest.case import OESelftestTestCase
  2. from oeqa.selftest.cases.buildhistory import BuildhistoryBase
  3. from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
  4. from oeqa.core.decorator.oeid import OETestID
  5. class BuildhistoryDiffTests(BuildhistoryBase):
  6. @OETestID(295)
  7. def test_buildhistory_diff(self):
  8. target = 'xcursor-transparent-theme'
  9. self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
  10. self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True)
  11. result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR'))
  12. expected_output = 'PR changed from "r1" to "r0"'
  13. self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output)