From f995f178de79d6d11422cd879d06371811f50651 Mon Sep 17 00:00:00 2001 From: Mariano Lopez Date: Mon, 31 Oct 2016 13:15:02 +0000 Subject: oeqa/runtime: Add case, context and loader classes for runtime testing This adds OERuntimeTestCase, OERuntimeTestContext, and OERuntimeTestLoader to be used for runtime testing. As expected there are some changes in runtime context: - Adds the target to be used for runtime testing, the default is a SSH connection to the device under test running a OE image. - Runtime context requires image manifest because several tests are skipped if a package is missing or installed. - Several tests require the output of the ps command and it changes its output and arguments if busybox o procps is installed, so the case must use the correct ps command. [YOCTO #10234] Signed-off-by: Mariano Lopez --- meta/lib/oeqa/runtime/loader.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta/lib/oeqa/runtime/loader.py (limited to 'meta/lib/oeqa/runtime/loader.py') diff --git a/meta/lib/oeqa/runtime/loader.py b/meta/lib/oeqa/runtime/loader.py new file mode 100644 index 0000000000..041ef976eb --- /dev/null +++ b/meta/lib/oeqa/runtime/loader.py @@ -0,0 +1,16 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.loader import OETestLoader +from oeqa.runtime.case import OERuntimeTestCase + +class OERuntimeTestLoader(OETestLoader): + caseClass = OERuntimeTestCase + + def _getTestCase(self, testCaseClass, tcName): + case = super(OERuntimeTestLoader, self)._getTestCase(testCaseClass, tcName) + + # Adds custom attributes to the OERuntimeTestCase + setattr(case, 'target', self.tc.target) + + return case -- cgit 1.2.3-korg