diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/buildoptions.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py index 5fb69d8170..ef6579b335 100644 --- a/meta/lib/oeqa/selftest/buildoptions.py +++ b/meta/lib/oeqa/selftest/buildoptions.py | |||
| @@ -4,6 +4,7 @@ import logging | |||
| 4 | import re | 4 | import re |
| 5 | 5 | ||
| 6 | from oeqa.selftest.base import oeSelfTest | 6 | from oeqa.selftest.base import oeSelfTest |
| 7 | from oeqa.selftest.buildhistory import BuildhistoryBase | ||
| 7 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | 8 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var |
| 8 | import oeqa.utils.ftools as ftools | 9 | import oeqa.utils.ftools as ftools |
| 9 | 10 | ||
| @@ -85,3 +86,22 @@ class SanityOptionsTest(oeSelfTest): | |||
| 85 | res = bitbake("gzip nfs-utils") | 86 | res = bitbake("gzip nfs-utils") |
| 86 | self.assertTrue("WARNING: QA Issue: gzip" in res.output) | 87 | self.assertTrue("WARNING: QA Issue: gzip" in res.output) |
| 87 | self.assertTrue("WARNING: QA Issue: nfs-utils" in res.output) | 88 | self.assertTrue("WARNING: QA Issue: nfs-utils" in res.output) |
| 89 | |||
| 90 | class BuildhistoryTests(BuildhistoryBase): | ||
| 91 | |||
| 92 | def test_buildhistory_basic(self): | ||
| 93 | self.run_buildhistory_operation('xcursor-transparent-theme') | ||
| 94 | self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR'))) | ||
| 95 | |||
| 96 | def test_buildhistory_buildtime_pr_backwards(self): | ||
| 97 | self.add_command_to_tearDown('cleanup-workdir') | ||
| 98 | target = 'xcursor-transparent-theme' | ||
| 99 | error = "ERROR: QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1 to .*-r0)" % target | ||
| 100 | self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True) | ||
| 101 | self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error) | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | |||
