summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-12-18 18:38:00 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-26 11:12:12 +0000
commitf4743e0686a4211edd610cc5f2de70a223723b70 (patch)
tree425e5c5e1307f8a6cdb2c80cbbf2089edccd7a8a /meta/lib/oeqa
parent2365e00b7c5e78f2ce5043a2e2495fef346ecb3d (diff)
downloadpoky-f4743e0686a4211edd610cc5f2de70a223723b70.tar.gz
oeqa/concurrencytest: fix for locating meta-selftest
The previous code assumed builddir and meta-selftest are in the same dir, but this isn't always true, builddir can be anywhere, use get_test_layer() to locate meta-selftest can fix the problem. (From OE-Core rev: 56d2493a9adfcc47ae7e265439e05ff42cdbbbbf) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/core/utils/concurrencytest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index f050289e61..e050818f0f 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -25,6 +25,7 @@ from itertools import cycle
25from subunit import ProtocolTestCase, TestProtocolClient 25from subunit import ProtocolTestCase, TestProtocolClient
26from subunit.test_results import AutoTimingTestResultDecorator 26from subunit.test_results import AutoTimingTestResultDecorator
27from testtools import ThreadsafeForwardingResult, iterate_tests 27from testtools import ThreadsafeForwardingResult, iterate_tests
28from oeqa.utils.commands import get_test_layer
28 29
29import bb.utils 30import bb.utils
30import oe.path 31import oe.path
@@ -141,6 +142,9 @@ def removebuilddir(d):
141 142
142def fork_for_tests(concurrency_num, suite): 143def fork_for_tests(concurrency_num, suite):
143 result = [] 144 result = []
145 if 'BUILDDIR' in os.environ:
146 selftestdir = get_test_layer()
147
144 test_blocks = partition_tests(suite, concurrency_num) 148 test_blocks = partition_tests(suite, concurrency_num)
145 # Clear the tests from the original suite so it doesn't keep them alive 149 # Clear the tests from the original suite so it doesn't keep them alive
146 suite._tests[:] = [] 150 suite._tests[:] = []
@@ -166,7 +170,6 @@ def fork_for_tests(concurrency_num, suite):
166 if 'BUILDDIR' in os.environ: 170 if 'BUILDDIR' in os.environ:
167 builddir = os.environ['BUILDDIR'] 171 builddir = os.environ['BUILDDIR']
168 newbuilddir = builddir + "-st-" + str(ourpid) 172 newbuilddir = builddir + "-st-" + str(ourpid)
169 selftestdir = os.path.abspath(builddir + "/../meta-selftest")
170 newselftestdir = newbuilddir + "/meta-selftest" 173 newselftestdir = newbuilddir + "/meta-selftest"
171 174
172 bb.utils.mkdirhier(newbuilddir) 175 bb.utils.mkdirhier(newbuilddir)