diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:28:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:31:28 +0300 |
commit | 193236933b0f4ab91b1625b64e2187e2db4e0e8f (patch) | |
tree | e12769d7c76d8b0517d6de3d3c72189753d253ed /poky/meta/lib/oeqa/core | |
parent | bd93df9478f2f56ffcbc8cb88f1709c735dcd85b (diff) | |
download | openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.tar.xz |
reset upstream subtrees to HEAD
Reset the following subtrees on HEAD:
poky: 8217b477a1(master)
meta-xilinx: 64aa3d35ae(master)
meta-openembedded: 0435c9e193(master)
meta-raspberrypi: 490a4441ac(master)
meta-security: cb6d1c85ee(master)
Squashed patches:
meta-phosphor: drop systemd 239 patches
meta-phosphor: mrw-api: use correct install path
Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/lib/oeqa/core')
-rw-r--r-- | poky/meta/lib/oeqa/core/target/qemu.py | 26 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/utils/concurrencytest.py | 5 |
2 files changed, 25 insertions, 6 deletions
diff --git a/poky/meta/lib/oeqa/core/target/qemu.py b/poky/meta/lib/oeqa/core/target/qemu.py index 538bf12b6..7a161a323 100644 --- a/poky/meta/lib/oeqa/core/target/qemu.py +++ b/poky/meta/lib/oeqa/core/target/qemu.py @@ -13,7 +13,7 @@ supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic'] class OEQemuTarget(OESSHTarget): def __init__(self, logger, server_ip, timeout=300, user='root', - port=None, machine='', rootfs='', kernel='', kvm=False, + port=None, machine='', rootfs='', kernel='', kvm=False, slirp=False, dump_dir='', dump_host_cmds='', display='', bootlog='', tmpdir='', dir_image='', boottime=60, **kwargs): @@ -25,17 +25,33 @@ class OEQemuTarget(OESSHTarget): self.rootfs = rootfs self.kernel = kernel self.kvm = kvm + self.use_slirp = slirp self.runner = QemuRunner(machine=machine, rootfs=rootfs, tmpdir=tmpdir, deploy_dir_image=dir_image, display=display, logfile=bootlog, boottime=boottime, - use_kvm=kvm, dump_dir=dump_dir, + use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir, dump_host_cmds=dump_host_cmds, logger=logger) - def start(self, params=None, extra_bootparams=None): - if self.runner.start(params, extra_bootparams=extra_bootparams): + def start(self, params=None, extra_bootparams=None, runqemuparams=''): + if self.use_slirp and not self.server_ip: + self.logger.error("Could not start qemu with slirp without server ip - provide 'TEST_SERVER_IP'") + raise RuntimeError("FAILED to start qemu - check the task log and the boot log") + if self.runner.start(params, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams): self.ip = self.runner.ip - self.server_ip = self.runner.server_ip + if self.use_slirp: + target_ip_port = self.runner.ip.split(':') + if len(target_ip_port) == 2: + target_ip = target_ip_port[0] + port = target_ip_port[1] + self.ip = target_ip + self.ssh = self.ssh + ['-p', port] + self.scp = self.scp + ['-P', port] + else: + self.logger.error("Could not get host machine port to connect qemu with slirp, ssh will not be " + "able to connect to qemu with slirp") + if self.runner.server_ip: + self.server_ip = self.runner.server_ip else: self.stop() raise RuntimeError("FAILED to start qemu - check the task log and the boot log") diff --git a/poky/meta/lib/oeqa/core/utils/concurrencytest.py b/poky/meta/lib/oeqa/core/utils/concurrencytest.py index f050289e6..e050818f0 100644 --- a/poky/meta/lib/oeqa/core/utils/concurrencytest.py +++ b/poky/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) |