All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bheemanadhuni, SrikanthX X" <srikanthx.x.bheemanadhuni@intel.com>
To: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: oe-selftest : Unset SANITY_TESTED_DISTROS bugzilla: 11933
Date: Fri, 23 Nov 2018 06:40:45 +0000	[thread overview]
Message-ID: <0473F6BDF4E7AC46B8E60219F1EDEEBC3C0A39@PGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <0473F6BDF4E7AC46B8E60219F1EDEEBC3C09B6@PGSMSX101.gar.corp.intel.com>


[-- 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


       reply	other threads:[~2018-11-23  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0473F6BDF4E7AC46B8E60219F1EDEEBC3C09B6@PGSMSX101.gar.corp.intel.com>
2018-11-23  6:40 ` Bheemanadhuni, SrikanthX X [this message]
2018-11-23 11:12   ` oe-selftest : Unset SANITY_TESTED_DISTROS bugzilla: 11933 Ola x Nilsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0473F6BDF4E7AC46B8E60219F1EDEEBC3C0A39@PGSMSX101.gar.corp.intel.com \
    --to=srikanthx.x.bheemanadhuni@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.