summaryrefslogtreecommitdiffstats
path: root/meta/lib
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:11:41 +0000
commit56d2493a9adfcc47ae7e265439e05ff42cdbbbbf (patch)
tree02230ed0d80630c3d3aae9b126ca3c645418eaa7 /meta/lib
parent95659bed3f6f3216b346f70cfc9ffae9788c0fc1 (diff)
downloadopenembedded-core-contrib-56d2493a9adfcc47ae7e265439e05ff42cdbbbbf.tar.gz
openembedded-core-contrib-56d2493a9adfcc47ae7e265439e05ff42cdbbbbf.tar.bz2
openembedded-core-contrib-56d2493a9adfcc47ae7e265439e05ff42cdbbbbf.zip
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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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
from subunit import ProtocolTestCase, TestProtocolClient
from subunit.test_results import AutoTimingTestResultDecorator
from testtools import ThreadsafeForwardingResult, iterate_tests
+from oeqa.utils.commands import get_test_layer
import bb.utils
import oe.path
@@ -141,6 +142,9 @@ def removebuilddir(d):
def fork_for_tests(concurrency_num, suite):
result = []
+ if 'BUILDDIR' in os.environ:
+ selftestdir = get_test_layer()
+
test_blocks = partition_tests(suite, concurrency_num)
# Clear the tests from the original suite so it doesn't keep them alive
suite._tests[:] = []
@@ -166,7 +170,6 @@ def fork_for_tests(concurrency_num, suite):
if 'BUILDDIR' in os.environ:
builddir = os.environ['BUILDDIR']
newbuilddir = builddir + "-st-" + str(ourpid)
- selftestdir = os.path.abspath(builddir + "/../meta-selftest")
newselftestdir = newbuilddir + "/meta-selftest"
bb.utils.mkdirhier(newbuilddir)