diff options
| author | Corneliu Stoicescu <corneliux.stoicescu@intel.com> | 2013-12-17 12:32:29 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-20 12:26:29 +0000 |
| commit | 7c1c3d1c6e4a042e5b20ce006d42757ffbba40f9 (patch) | |
| tree | 1d912cd3043dc7bfbf06d82d8c57189440142a33 | |
| parent | 6fe6a91db50da283041df0327fcb5621809710d8 (diff) | |
| download | poky-7c1c3d1c6e4a042e5b20ce006d42757ffbba40f9.tar.gz | |
oe-selftest: added buildhistory buildtime tests in module buildoptions.py
(From OE-Core rev: 0e462295d9db0201fb1ba2b6247ecb05fa7fcee1)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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 | |||
