[oe-commits] [openembedded-core] 09/25: selftest/context: Avoid tracebacks from tests using multiprocessing
git at git.openembedded.org
git at git.openembedded.org
Wed Feb 19 22:15:45 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit de4210c0da6e32efa3eb71a8c2d06cee18045e8f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Feb 19 17:27:26 2020 +0000
selftest/context: Avoid tracebacks from tests using multiprocessing
We can see tracebacks where the SIGTERM handler catches things
it shouldn't. Avoid exit(1) unless we're the process that
it was intended for.
[YOCTO #13664]
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/context.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index c4eb5d6..3d3b19c 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -280,11 +280,15 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
return rc
def _signal_clean_handler(self, signum, frame):
- sys.exit(1)
+ if self.ourpid == os.getpid():
+ sys.exit(1)
def run(self, logger, args):
self._process_args(logger, args)
+ # Setup a SIGTERM handler to allow restoration of files like local.conf and bblayers.conf
+ # but don't interfer with other processes
+ self.ourpid = os.getpid()
signal.signal(signal.SIGTERM, self._signal_clean_handler)
rc = None
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list