From 157c3be2ca93f076033f725ec1ee912df91f7488 Mon Sep 17 00:00:00 2001 From: Leonardo Sandoval Date: Fri, 12 May 2017 14:40:21 -0700 Subject: oeqa/selftest/cases: Migrate test cases into the new oe-qa framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/oescripts.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta/lib/oeqa/selftest/cases/oescripts.py (limited to 'meta/lib/oeqa/selftest/cases/oescripts.py') 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 @@ +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("buildhistory-diff -p %s" % get_bb_var('BUILDHISTORY_DIR')) + expected_output = 'PR changed from "r1" to "r0"' + self.assertTrue(expected_output in result.output, msg="Did not find expected output: %s" % result.output) -- cgit v1.2.3-54-g00ecf