Commit Graph

38 Commits

Author SHA1 Message Date
Richard Purdie a71e71f9c4 oeqa/targetcontrol: Drop unused get_target_controller function
This funciton appears completely unused, drop it.

(From OE-Core rev: 31ccc70c4ea58e3781ea14eb534e00e9e06e131a)

(From OE-Core rev: 31b8991de32ce91af58eab183f283adcded737c2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:59 +00:00
Patrick Ohly c76abc379e oeqa: allow persistent image writes in runqemu()
By default, QemuRunner avoids modifying the image files that it boots
into by enabling the qemu snapshot mode. However, some tests may want
to test changes that must persists across reboots, so this mode
should be optional.

This can be combined by copying the image file to a temporary location
first and then booting with that copy. It's also useful when testing
with additional drives attached to a virtual machine.

QemuTinyRunner doesn't use the snapshot parameter and therefore ignores
the new parameter.

Long term, a better way of passing these various configuration
parameters should be used, and perhaps QemuRunner and QemuTinyRunner
can be merged into one again to avoid code duplication. But for now
the patch follows the exiting style.

Also beware that QemuTarget.start() now acts in two different modes
(with or without explicit launch command), and depending on that mode
parameters like discard_writes must be ignored, i.e. not get passed to
launch().

(From OE-Core rev: 969d079a33a57f5a8f7af86d7bab04d35ab07584)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 10:34:37 +01:00
Patrick Ohly 759fcd204f oeqa: QEMU_USE_KVM can list machines
Previously, QEMU_USE_KVM=True enabled the use of kvm only when "x86"
was in the MACHINE name. That is too limiting, because for example
intel-corei7-64 can also use kvm but it wasn't possible to enable that
without changing OE-core.

That traditional usage is still supported. In addition, QEMU_USE_KVM
can be set to a list of space-separated MACHINE names for which kvm is
to be enabled.

(From OE-Core rev: d5421dd00b9cf785fa77e77c6c739e8bd8822fa3)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:13 +01:00
Robert Yang c085688a5b targetcontrol.py: use logger.info to replace of bb.note
The bb.note prints multiple same lines when invoke this class again, but
if we set mainlogger.propagate = False, nothing would be printed,
according to logging's document:

https://docs.python.org/3/library/logging.html
Note
If you attach a handler to a logger and one or more of its ancestors, it
may emit the same record multiple times. In general, you should not need
to attach a handler to more than one logger - if you just attach it to
the appropriate logger which is highest in the logger hierarchy, then it
will see all events logged by all descendant loggers, provided that
their propagate setting is left set to True. A common scenario is to
attach handlers only to the root logger, and to let propagation take
care of the rest.

We may need avoid using bb.note or bb.warn in oeqa since it attaches
multiple log handlers which may cause confusions

This patch only sets "mainlogger.propagate = False" in
selftest/runqemu.py and use logger.info to replace bb.note in
targetcontrol.py to minimize the impact.

[YOCTO #10249]

(From OE-Core rev: b139790422bc8e0d80bad063bb78bc1632731bc1)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Robert Yang b742fd023e oeqa/targetcontrol.py: modify it to test runqemu
Modify the following files to test runqemu:
    targetcontrol.py
    utils/commands.py
    utils/qemurunner.py

We need simulate how "runqemu" works in command line, so when test
"runqemu", the targetcontrol.py, utils/commands.py and
utils/qemurunner.py don't have to find the rootfs or set env vars.

[YOCTO #10249]

(From OE-Core rev: 9305d816bdf8837ea3a407091cb7f24a9a3ae8dc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Patrick Ohly 58e6e7c204 qemurunner: configurable timeout for run_serial()
Some commands might need to run longer than the default timeout of
five seconds. If that occurred, run_serial() returned with a status
code of zero (sic!) and no other indication of what went wrong.

Now the timeout is configurable (with five still the default) and
an explicit warning ("<<< run_serial(): command timed out after 5 seconds without output >>>")
gets appended at the end of the data returned to the caller.

While at it, the logic for checking for the timeout was updated a bit
because both implementations could overshoot the timeout when entering
select() right before the final deadline.

(From OE-Core rev: accf0362f964cc9d6330b6e52e83d748d890521f)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Ed Bartosh 27badf83ec targetcontrol: add image_fstype argument to commands.runqemu
qemu runner picks up first fsimage type from the hard-coded
list of supported types. This makes it impossible to test
particular image type unless it's not ext4(first type in
the hardcoded list of types).

Added image_fstypes argument to commands.runqemu and QemuTarget
__init__ to specify type of the image to run qemu with.

This will be used to pass wic image type to test efi wic images.

(From OE-Core rev: f1f224a2d4d3f2a760632c2254e91a8f94c8814f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Ed Bartosh 383cd20828 qemurunner: add runqemuparams argument to commands.runqemu
Added possibility to pass additional runqemu parameters
down the stack of APIs:
 commands.runqemu -> QemuTarget.start -> QemuRunner.start

This will be used to pass ovmf parameter in testing of
efi wic images under qemu.

(From OE-Core rev: 5aa4b5a10fb8191cd3453d09701c8beeff9a952f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Richard Purdie 8c46605d16 oeqa: Use snapshot instead of copying the rootfs image
Rather than copying images, use the snapshot option to qemu. This fixes a regression
caused by the recent runqemu changes where the wrong images were being testes since
the image is copied without the qemuboot.conf file. This means the latest image is
found by runqemu rather than the specified one, leading to various confused testing
results.

It could be fixed by copying more files but use snapshot mode instead.

(From OE-Core rev: eab91997d415b0e690b3482749a32087e6a8b00a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-09 12:07:32 +01:00
Bill Randle f479e3866d testimage: allow using kvm when running qemux86* machines
Using kvm can provide significant speedups when running qemux86* machines
on an x86* host. Enabled by using the new QEMU_USE_KVM variable.

[YOCTO #9298]

(From OE-Core rev: ebac2c8d1fcd09ebce0659a4abb445e4f1c18571)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-18 09:27:53 +01:00
Aníbal Limón 3ac3f3f309 oeqa: start() add remaining args SimpleRemoteTarget and QemuTinyRunner
Now Runner's support extra_bootargs for the kernel so add
extra_bootparams to the start() methods to avoid exception.

(From OE-Core rev: 4c28c03a2322fbcb9a5c268b08eaeb71d940ee04)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:34 +01:00
Aníbal Limón ad6aaae4bf utils/qemurunner.py: QemuRunner.start() add support for specify extra kernel cmdline
Add ability to specify extra_bootargs (kernel cmdline) in order to enable systemd
debug log in images that enables systemd init.

[YOCTO #9299]

(From OE-Core rev: 09d62551c289b5607341a4f9c46eecd6390ad774)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20 10:28:47 +01:00
Richard Purdie 3b39971748 classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.

(From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:01 +01:00
Ed Bartosh f799e218ed oeqa/targetcontrol: support wic image type
Added 'wic' to the list image types supported by targetcontrol.

This is a preparation for booting and testing wic images
with oe-selftest.

[YOCTO #8498]

(From OE-Core rev: 7dda053fbd1ea1354b7720cfa691470ba88ef5b9)

(From OE-Core rev: 4b84328d3cd0d87ad146f034b58f68a5158313d7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh 7066f1671e oeqa/targetcontrol: make ssh control optional
Added new parameter 'ssh' to targetcontrol 'start' method
to be able to test images without running ssh server.

[YOCTO #8498]

(From OE-Core rev: 1c3c66aadd43092bc19242b0651ee810cc31fe7c)

(From OE-Core rev: 67ccf7413b2ac9f516dbdaa6a39d4cec38a6c94d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Richard Purdie ef0fe3193e oeqa: Test failure/cleanup improvements
Currently, if qemu segfaults, the tests merrily continue trying to execute
which takes time for them to timeout and is a bit silly. Worse, no logs about
the segfault are shown to the user, its silent!

This patch tries to unravel the tangled web of issues and ensures that we:

* install a SIGCHLD handler which tells the user qemu exited
* check if qemu is running, if it isn't fail the test outright
* don't leave processes behind in sshcontrol which would hold
  bitbake.lock and block shutdown

(From OE-Core rev: 5c04b1ca1e989f569d5755a646734d01a0c56cae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06 15:26:18 +01:00
Mariano Lopez 53ab41a5f6 qemurunner: Added host dumps when there are errors
This adds an instance of HostDumper to qemurunner,
with this instance now is possible to get dumps
from the host when there is an error.

This adds dump points in the next cases:
    - runqemu exits before seeing qemu pid
    - Fail to get qemu process arguments
    - Not reach login banner before timeout
    - qemu pid never appears

This also modifies the constructors of BaseDumper,
HostDumper and TargetDumper, they don't require
the datastore anymore, but the feature to replace
datastore variables has been lost (never used)

[YOCTO #8118]

(From OE-Core rev: b0af40fb76cd5035696e9d8a44f815f64214d23a)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03 12:43:16 +01:00
Mariano Lopez 85fd1a7a12 dump: Created new classes for dump host and target
It makes sense to separate the dump commands from the
oeRuntimeTest class, this way it can be used in all
the test context.

These are the changes included in this patch:

    - Created classes: BaseDumper, HostDumper, TargetDumper
    - Create an instance of HostDumper in imagetest.bbclass
      and add it to TestContext class, this way any class
      that have access to the TestContext would be able
      to dump logs from the host
    - Create an instance of TargetDumper in QemuTarget
      class after get the runner, this way it is
      accessible during the tests.

[YOCTO #8118]

(From OE-Core rev: ad10af6be343b5425fde43055263b0744c161cb3)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:36:12 +01:00
Mariano Lopez 48373be830 testimage: Run commands in target and host when test fails
This patch modify three files altought two of them
are minimal modifications. This version includes
the changes proposed by Paul.

testimage.bbclass:
    Create new vars for easy modification of the dump
directory and commands to be run on host and target
when a test fails
    TESTIMAGE_DUMP_DIR: Directory to save the dumps
    testimage_dump_target: Commands to run on target
    testimage_dump_host: Commands to run on host

oetest.py:
    - Allow to use the vars defined in testimage class
    - Now able to run commands in the host and dump the
      results
    - Fix an issue with the condition where to run the
      dump commands (Before it run the commands every
      test after a failure, now it runs the commands only
      in tests that failed)
    - Fix the output to stdout

[YOCTO #8118]

(From OE-Core rev: 26fe645457633f90bb5ddbb12f5f7b9ca4a06cc5)

(From OE-Core rev: 7b4fbbf979ed22434b8e3f83ae145139bb0d9fc7)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:36:07 +01:00
Richard Purdie e3aa7a30b3 targetcontrol: Improve logs by outputting qemu boot log in case of failure
We've had a few cases on the autobuilder where we've lost logs of
the boot and been unable to debug it further. Show this information
onto the console to be more useful.

(From OE-Core rev: 5302b7b8fa1349ae99040fe8fdcc4e42c722cc10)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Paul Eggleton 01ccad15da oeqa/targetcontrol: write QemuRunner log output to a file
If we use this outside of testimage we don't have a task log; so let's
just explicitly write the log output to a file all the time so it's
always there to look at (particularly useful when runqemu exits
immediately with an error.)

(From OE-Core rev: 09b7ed39df150257cfe2eb55a8f8c7475e73217e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton 69bae0651e oeqa/targetcontrol: create test directory before copying rootfs image
The test directory might not exist at this point so just go ahead and
create it.

(From OE-Core rev: 7ef86ce62b52f0f3d0c51e3c20d7b4f37025bf41)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Richard Purdie 86d30d756a meta: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.

This patch was mostly made using the command:

sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`

(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:57:25 +01:00
Lucian Musat fa5970e0d9 oeqa/targetcontrol: Add support for poky-tiny in QemuTarget.
(From OE-Core rev: 8f1a52a3f72506911154769e6ad4a44f32c3112e)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:27 +01:00
Richard Purdie 7dcf6c9d45 machine/qemu: Switch from ext3 to ext4
There is no good reason not to use ext4 at this point, it has advantages
and few drawbacks. Therefore switch the qemu machines over (and the default
runqemu script options).

(From OE-Core rev: 430b9ae71b1aa76f8421127d17e0e0723d4818d3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:37 +00:00
Corneliu Stoicescu 7b453165ab oeqa/targetcontrol.py: Separate the matching of supported image fstypes from the resulting value check.
Because we used a bb.fatal call inside the get_image_fstype classmethod, this caused problems when accessed without instantiating the object with a valid bb environment.

Separating the matching part of the classmethod(that is usable by outside scripts) from the check of the resulting value.
The matching is done within a new classmethod and the latter keeps the old method name and internal functionality, this way we don't have to change any other target controllers code.

(From OE-Core rev: 50ddd5d0149666ad60133d8eb6cc789c5b97e5e4)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24 19:54:10 +01:00
Corneliu Stoicescu a5aa889d63 targetcontrol.py: Add a classmethod to get extra files needed by the target controllers
YB: #6254

Add a new classmethod that can be used by outside scripts to get the extra files needed by the target controllers.
An outside script can predict rootfs, manifest and kernel files needed by a target controller, but sometimes there are other files needed.

(From OE-Core rev: fea627022473cfb73299d0988628962ad8e80f89)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13 12:52:21 +01:00
Corneliu Stoicescu af38422017 targetcontrol.py: make possible dynamical determination of rootfs type
YB: #6375

Added a new method get_image_fstype() that autodetermines what fstype to use for the rootfs file.
This method uses a new list variable 'supported_image_fstypes' that contains image fstypes supported by the target controller.

This method is also a classmethod which means outside scripts can get the image fstype.

(From OE-Core rev: 39d5aa5c9f2916700f81d15adc220a30c6b120d1)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13 12:52:20 +01:00
Paul Eggleton abdd8e708d classes/testimage: if start fails, don't try to stop
If we couldn't start the target, it doesn't make sense to try and stop
it here since logically it shouldn't now be in any kind of "started"
state. (It's the start function's job to clean up after itself if it
fails - to that end, fix up the QemuTarget class so that it does.)

(From OE-Core rev: 819ebddae6b78120e5e082423793ff988419b5c4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30 21:52:32 +01:00
Stefan Stanacar bd64b91314 oeqa/targetcontrol: restart method shouldn't be abstract
And drop the un-needed and un-used restart methods.
Only qemu ever used this and actually does it safely.

(From OE-Core rev: 1dd1edb5ea551c8a01538b130aa4d0c361eae14d)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30 21:52:32 +01:00
Stefan Stanacar 724b83d141 oeqa/targetcontrol: fix loading a controller using a class name
This was wrong and if one would do TEST_TARGET = "SimpleRemoteTarget"
instead of TEST_TARGET = "simpleremote" it would complain
that there is no such controller when there is.

(From OE-Core rev: 47d2049d13ab71e0310e9eedaf307d6c3e530b44)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11 08:11:41 -07:00
Stefan Stanacar 517bc165bb oeqa/targetcontrol: allow a custom port for SimpleRemoteTarget
We had the ability to use a custom port for the ssh connection,
but we weren't using it.

(From OE-Core rev: c1f2a3c41969df0b7f08cf314b2cb7c9a6030092)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11 08:11:41 -07:00
Stefan Stanacar 9744e0fb0a oeqa/targetcontrol: make BaseTarget an abstract class
This should make it clear what methods a subclass
needs to redefine.

(From OE-Core rev: a4e4de4189cec3076a863c32c98e02766187ab48)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28 14:01:13 +00:00
Stefan Stanacar 3ab2b7f10c oeqa/targetcontrol: properly get the host ip
For the SimpleRemote target where we need the host ip and
it wasn't set in conf, we tried to determine it automatically.
However ip route output isn't the same for every network, we
need the last field from the first line.

(From OE-Core rev: 19af3ac53690b1bd2fee54827090f59c525d2236)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-25 17:53:04 +00:00
Sipke Vriend c99622e38b lib/oeqa: allow multiple layers to provide their own TEST_TARGET class
Use a python module "folder" rather than a single module within
layers to ensure multiple layers can define a TEST_TARGET class.
Current implementation using controllers.py module will only allow
a single layer to define test targets.

Add a controllers folder as well as a TestTargetLoader class whose
job is to load the given TEST_TARGET class from any number of
python modules within the oeqa/controllers/ directory of any
layer.
The only condition will be that layers will need to ensure
the TEST_TARGET class name they provide is unique otherwise there
is no guarantee which class is instantiated. a bb.warn is used
to alude to this if it happens.

(From OE-Core rev: 3f25705f4a986e06cbd397aaea52b841c1a1e054)

Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 22:37:41 +00:00
Stefan Stanacar bf7383de87 lib/oeqa: allow a layer to provide it's own TEST_TARGET class
Allows a layer to define new classes in <layer>/lib/oeqa/utils/controllers.py
and completely control or extend deployment of a target. (core currently
has QemuTarget and SimpleRemoteTarget).
The value of TEST_TARGET must be the name of the new class.

(From OE-Core rev: 9b81aff0aca42353d448b1e9522f89842e23c7b2)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-19 16:32:09 +00:00
Stefan Stanacar 17e3dc2cb5 lib/oeqa: targetcontrol.py: add abstraction for running tests on different targets
Add a new module which abstracts the target object used by testimage.bbclass

The purpose of this module is to move the deployment of a target from testimage.bbclass,
basically abstracting different implementations of how we setup a target and how it runs commands.
It allows to select one implementation or another by setting TEST_TARGET (currently to: "qemu" and "simpleremote").

QemuTarget is used to start a qemu instance (as it's currently done in testimage.bbclass)
SimpleRemoteTarget is meant for a remote machine (by setting TEST_TARGET_IP) that's already up and running
with network and ssh.
Simply put, it opens the door for running the tests on different types of targets by adding new classes
(maybe qemu-nfsroot or remote-special etc.). One could also override BaseTarget which currently uses
the existing SSHControl module and add a serial implementation.

[ YOCTO #5554 ]

(From OE-Core rev: c1bfd4017f6f6502a68ceb3edf7d2027d02a309d)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:52 +00:00