]> code.ossystems Code Review - openembedded-core.git/commit
utils: Add multiprocess_launch API and testcase
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Jul 2018 20:31:35 +0000 (20:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Jul 2018 10:52:07 +0000 (11:52 +0100)
commit88f0c214e593a45566df5131bda4c946f5ccc8c2
tree373c24f6569fdcfa60cc472ce380cf27e9f97620
parent1f279cf1ad2f0a20495780b210a987416650f40f
utils: Add multiprocess_launch API and testcase

The current methods of spawning processes for parallel execution have
issues around collection of results or exceptions.

Take the code from package_ipk/deb, make it generic, add a results
collection mechanism, fix the exception handling and for it into a
standard library function.

Also add a test case which tests both the success and failure modes
of operation to stop this functionality regressiing again.

In particular, compared to multiprocess_exec, this fork off the parent
approach means we can pass in the datastore and functions work in the
same scope as the parent. This removes some of the complexities
found trying to scale multiprocess_exec to wider use.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/utils.py
meta/lib/oeqa/selftest/cases/oelib/utils.py