summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/oescripts.py
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2017-05-12 14:40:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 19:02:43 +0100
commit157c3be2ca93f076033f725ec1ee912df91f7488 (patch)
tree8ef896ff7adf78d63b34059cd5b017a4f0a3419a /meta/lib/oeqa/selftest/cases/oescripts.py
parent10c512b60d1167122b5fe778b93838dca3def717 (diff)
downloadpoky-157c3be2ca93f076033f725ec1ee912df91f7488.tar.gz
oeqa/selftest/cases: Migrate test cases into the new oe-qa framework
New framework has different classes/decorators so adapt current test cases to support these. Changes include changes on base classes and decorators. Also include paths in selftest/__init__.py isn't needed because the loader is the standard unittest one. (From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/oescripts.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/oescripts.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
new file mode 100644
index 0000000000..1ee753763e
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -0,0 +1,15 @@
1from oeqa.selftest.case import OESelftestTestCase
2from oeqa.selftest.cases.buildhistory import BuildhistoryBase
3from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
4from oeqa.core.decorator.oeid import OETestID
5
6class BuildhistoryDiffTests(BuildhistoryBase):
7
8 @OETestID(295)
9 def test_buildhistory_diff(self):
10 target = 'xcursor-transparent-theme'
11 self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
12 self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True)
13 result = runCmd("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR'))
14 expected_output = 'PR changed from "r1" to "r0"'
15 self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output)