diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-11-26 11:18:22 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-03 17:45:51 +0000 |
commit | b4d9b4208b1c06164c4eeea2110408fb404dba1c (patch) | |
tree | 12709d6e6b26777f9a2973022a2e7b32ea0e3d2b /meta/lib/oeqa/runtime | |
parent | fd2d16519d964ef3420cb83ac9680a4b6206cefa (diff) | |
download | poky-b4d9b4208b1c06164c4eeea2110408fb404dba1c.tar.gz |
testimage: use the new targetcontrol.py module for running tests
This patch makes the necessary changes for using the targetcontrol.py module
so that one can run the same tests on a qemu instance or a remote machine
based on the value of TEST_TARGET variable: "qemu" or "simpleremote".
The default value is "qemu" which starts a qemu instance and it's the
with what we currently have.
With "simpleremote", the remote machine must be up with network and ssh
and you need to set TEST_TARGET_IP with the IP address of the remote machine
(it can still be a qemu instance that was manually started).
Basically testimage.bbclass now does something along the lines of:
- load tests -> deploy (prepare) / start target -> run tests.
There were a couple of changes necessary for tests and
also some cleanups/renames that were needed to adjust this change. (use
ip everywhere when refering to target and server_ip when refering to host/build machine)
Also two unnecessary and unsed methods were dropped from sshcontrol.
[ YOCTO #5554 ]
(From OE-Core rev: a7820350fa3271d78ed7476e02f4aef593be1125)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/ping.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/smart.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/ping.py b/meta/lib/oeqa/runtime/ping.py index 0d028f9b22..a73c72402a 100644 --- a/meta/lib/oeqa/runtime/ping.py +++ b/meta/lib/oeqa/runtime/ping.py | |||
@@ -11,7 +11,7 @@ class PingTest(oeRuntimeTest): | |||
11 | count = 0 | 11 | count = 0 |
12 | endtime = time.time() + 60 | 12 | endtime = time.time() + 60 |
13 | while count < 5 and time.time() < endtime: | 13 | while count < 5 and time.time() < endtime: |
14 | proc = subprocess.Popen("ping -c 1 %s" % oeRuntimeTest.tc.qemu.ip, shell=True, stdout=subprocess.PIPE) | 14 | proc = subprocess.Popen("ping -c 1 %s" % self.target.ip, shell=True, stdout=subprocess.PIPE) |
15 | output += proc.communicate()[0] | 15 | output += proc.communicate()[0] |
16 | if proc.poll() == 0: | 16 | if proc.poll() == 0: |
17 | count += 1 | 17 | count += 1 |
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py index c3fdf7d499..7ef4b0e649 100644 --- a/meta/lib/oeqa/runtime/smart.py +++ b/meta/lib/oeqa/runtime/smart.py | |||
@@ -46,7 +46,7 @@ class SmartRepoTest(SmartTest): | |||
46 | 46 | ||
47 | @classmethod | 47 | @classmethod |
48 | def setUpClass(self): | 48 | def setUpClass(self): |
49 | self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.qemu.host_ip) | 49 | self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.target.server_ip) |
50 | self.repo_server.start() | 50 | self.repo_server.start() |
51 | 51 | ||
52 | @classmethod | 52 | @classmethod |
@@ -58,7 +58,7 @@ class SmartRepoTest(SmartTest): | |||
58 | 58 | ||
59 | def test_smart_channel_add(self): | 59 | def test_smart_channel_add(self): |
60 | image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True) | 60 | image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True) |
61 | deploy_url = 'http://%s:%s/%s' %(self.tc.qemu.host_ip, self.repo_server.port, image_pkgtype) | 61 | deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype) |
62 | pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True) | 62 | pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True) |
63 | for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)): | 63 | for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)): |
64 | if arch in pkgarchs: | 64 | if arch in pkgarchs: |