* oe-selftest : Unset SANITY_TESTED_DISTROS bugzilla: 11933
[not found] <0473F6BDF4E7AC46B8E60219F1EDEEBC3C09B6@PGSMSX101.gar.corp.intel.com>
@ 2018-11-23 6:40 ` Bheemanadhuni, SrikanthX X
2018-11-23 11:12 ` Ola x Nilsson
0 siblings, 1 reply; 2+ messages in thread
From: Bheemanadhuni, SrikanthX X @ 2018-11-23 6:40 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1.1: Type: text/plain, Size: 345 bytes --]
Hi,
unset the SANITY_TESTED_DISTROS in the function _add_layer_libs() file b/meta/lib/oeqa/selftest/context.py
And added function remove_variables() which is called in
final:
self.remove_variables()
the function will comment the the unset SANITY_TESTED_DISTROS in local.conf
Thanks && Best Regards
Srikanth B
[-- Attachment #1.2: Type: text/html, Size: 3255 bytes --]
[-- Attachment #2: 0001-oe-selftest-Unset-SANITY_TESTED_DISTROS.patch --]
[-- Type: application/octet-stream, Size: 2994 bytes --]
From 9afb2cd22a74ee9918341745f71a9102b4397a77 Mon Sep 17 00:00:00 2001
From: bheema1x <srikanthx.x.bheemanadhuni@intel.com>
Date: Fri, 23 Nov 2018 10:11:16 +0800
Subject: [PATCH] oe-selftest : Unset SANITY_TESTED_DISTROS
Unsetting SANITY_TESTED_DISTROS to avoid warning that
are treated like failures by oe-selftest suite.
Signed-off-by: bheema1x <srikanthx.x.bheemanadhuni@intel.com>
---
meta/lib/oeqa/selftest/context.py | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 9e90d3c..9b8de39 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -11,12 +11,12 @@ from shutil import copyfile
from random import choice
import oeqa
-
+import oeqa.utils.ftools as ftools
from oeqa.core.context import OETestContext, OETestContextExecutor
from oeqa.core.exception import OEQAPreRun, OEQATestNotFound
from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
-
+layerappend = ''
class OESelftestTestContext(OETestContext):
def __init__(self, td=None, logger=None, machines=None, config_paths=None):
super(OESelftestTestContext, self).__init__(td, logger)
@@ -186,16 +186,23 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
if "PRSERV_HOST" in self.tc.td:
self.tc.logger.error("Please unset PRSERV_HOST in order to run oe-selftest")
raise OEQAPreRun
-
+ builddir = os.environ.get("BUILDDIR")
if "SANITY_TESTED_DISTROS" in self.tc.td:
- self.tc.logger.error("Please unset SANITY_TESTED_DISTROS in order to run oe-selftest")
- raise OEQAPreRun
+ self.layerappend = "\n#Unset SANITY_TESTED_DISTROS added by oe-selftest.py\nSANITY_TESTED_DISTROS=''"
+ ftools.append_file(builddir + "/conf/local.conf", self.layerappend)
_add_layer_libs()
self.tc.logger.info("Running bitbake -p")
runCmd("bitbake -p")
+ def remove_variables():
+ if "#Unset SANITY_TESTED_DISTROS added by oe-selftest.py" \
+ in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
+ self.tc.logger.info("Removing SANITY_TESTED_DISTROS from local.conf")
+ ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \
+ "\n#Unset SANITY_TESTED_DISTROS added by oe-selftest.py\nSANITY_TESTED_DISTROS=''")
+
def _internal_run(self, logger, args):
self.module_paths = self._get_cases_paths(
self.tc_kwargs['init']['td']['BBPATH'].split(':'))
@@ -273,7 +280,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
if os.path.exists(output_link):
os.remove(output_link)
os.symlink(args.output_log, output_link)
-
+ self.remove_variables()
return rc
_executor_class = OESelftestTestContextExecutor
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: oe-selftest : Unset SANITY_TESTED_DISTROS bugzilla: 11933
2018-11-23 6:40 ` oe-selftest : Unset SANITY_TESTED_DISTROS bugzilla: 11933 Bheemanadhuni, SrikanthX X
@ 2018-11-23 11:12 ` Ola x Nilsson
0 siblings, 0 replies; 2+ messages in thread
From: Ola x Nilsson @ 2018-11-23 11:12 UTC (permalink / raw)
To: Bheemanadhuni, SrikanthX X; +Cc: openembedded-core
On Fri, Nov 23 2018, Bheemanadhuni, SrikanthX X wrote:
> Hi,
>
>
>
> unset the SANITY_TESTED_DISTROS in the function _add_layer_libs() file b/meta/lib/oeqa/selftest/context.py
>
>
>
> And added function remove_variables() which is called in
>
> final:
>
> self.remove_variables()
>
> the function will comment the the unset SANITY_TESTED_DISTROS in local.conf
>
I would keep/modify the message that SANITY_TESTED_DISTROS is needed, so
the user could set it before running oe-selftest the next time. Just
like the meta-selftest layer.
--
Ola x Nilsson
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-23 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0473F6BDF4E7AC46B8E60219F1EDEEBC3C09B6@PGSMSX101.gar.corp.intel.com>
2018-11-23 6:40 ` oe-selftest : Unset SANITY_TESTED_DISTROS bugzilla: 11933 Bheemanadhuni, SrikanthX X
2018-11-23 11:12 ` Ola x Nilsson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.