diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /poky/meta/lib/oeqa/core/utils/concurrencytest.py | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'poky/meta/lib/oeqa/core/utils/concurrencytest.py')
-rw-r--r-- | poky/meta/lib/oeqa/core/utils/concurrencytest.py | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/poky/meta/lib/oeqa/core/utils/concurrencytest.py b/poky/meta/lib/oeqa/core/utils/concurrencytest.py index 01c39830f..b2eb68fb0 100644 --- a/poky/meta/lib/oeqa/core/utils/concurrencytest.py +++ b/poky/meta/lib/oeqa/core/utils/concurrencytest.py @@ -183,10 +183,11 @@ class dummybuf(object): # class ConcurrentTestSuite(unittest.TestSuite): - def __init__(self, suite, processes, setupfunc): + def __init__(self, suite, processes, setupfunc, removefunc): super(ConcurrentTestSuite, self).__init__([suite]) self.processes = processes self.setupfunc = setupfunc + self.removefunc = removefunc def run(self, result): tests, totaltests = fork_for_tests(self.processes, self) @@ -237,22 +238,6 @@ class ConcurrentTestSuite(unittest.TestSuite): finally: queue.put(test) -def removebuilddir(d): - delay = 5 - while delay and os.path.exists(d + "/bitbake.lock"): - time.sleep(1) - delay = delay - 1 - # Deleting these directories takes a lot of time, use autobuilder - # clobberdir if its available - clobberdir = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir") - if os.path.exists(clobberdir): - try: - subprocess.check_call([clobberdir, d]) - return - except subprocess.CalledProcessError: - pass - bb.utils.prunedir(d, ionice=True) - def fork_for_tests(concurrency_num, suite): result = [] if 'BUILDDIR' in os.environ: @@ -297,7 +282,7 @@ def fork_for_tests(concurrency_num, suite): if ourpid != os.getpid(): os._exit(0) if newbuilddir and unittest_result.wasSuccessful(): - removebuilddir(newbuilddir) + suite.removefunc(newbuilddir) except: # Don't do anything with process children if ourpid != os.getpid(): @@ -313,7 +298,7 @@ def fork_for_tests(concurrency_num, suite): sys.stderr.write(traceback.format_exc()) finally: if newbuilddir: - removebuilddir(newbuilddir) + suite.removefunc(newbuilddir) stream.flush() os._exit(1) stream.flush() |